I don't think that this will work if 3 was never chosen
instead I suggest downloading -fre- (from ssc); it has an option to
include all labeled values even if no occurrences
Rich
Neil Shephard wrote:
> On Fri, Dec 4, 2009 at 2:03 PM, Katja Hillmann
> <[email protected]> wrote:
>> Hi,
>>
>> I have the following problem:
>>
>> I conducted a survey with questions concerning the satisfaction of consumers
>> with regard to certain products. 1=excellent, 2=good, 3=normal, 4=bad,
>> 5=very bad
>>
>> In some cases the label 3 (normal) was not choosen by the consumers we
>> asked. Instead we place a "." for it. When I tabulate the variables, then
>> stata do not give the frequency of 0 for label 3, but left it out and
>> places the . as missings beneath the frequency table. How can I force Stata
>> to give out the label 3 with a frequency of zero:
>>
>> excellent
>> good
>> normal 0
>> bad
>> very bad
>>
>> instead of
>>
>>
>> satis | Freq. Percent Cum.
>> ------------+-----------------------------------
>> excellent | 3 33.33 33.33
>> good | 1 11.11 44.44
>> bad | 2 22.22 66.67
>> very bad | 3 33.33 100.00
>> ------------+-----------------------------------
>> Total | 9 1
>>
>>
>> ???
>
> Read the -man tabulate- page and you will see that there is a -,
> missing- option which when specified will include the missing variable
> in the table. Unfortunately since Stata treats '.' (missing) as a
> number higher than any other number this will always come out as....
>
> satis | Freq. Percent Cum.
> ------------+-----------------------------------
> excellent | 3 33.33 33.33
> good | 1 11.11 44.44
> bad | 2 22.22 66.67
> very bad | 3 33.33 100.00
> normal | 0 0.00 100.00
> ------------+-----------------------------------
> Total | 9 1
>
> The other option is to simply...
>
> replace satis = 3 if(satis == .)
>
> ...before doing your tabulation.
>
> Neil
>
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/