Thank you
for the attention;
I exemplify my problem with the date that you suggested
me.
When I
request tabulate - by rep78: tab foreign
- There is not foreign record for rep78=1 or to rep78=2. I would like to know if there is a command in
stata that allows to see - Foreign = 0 - when rep78 =1 or 2.
Am I clear
what I need? Is it possible to make that or not?
by rep78 :
tab foreign
. sort rep78
. by rep78 :
tab foreign
_______________________________________________________________________________
-> rep78 = 1
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic
| 2 100.00 100.00
------------+-----------------------------------
Total
| 2 100.00
_______________________________________________________________________________
-> rep78 = 2
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic
| 8 100.00 100.00
------------+-----------------------------------
Total
| 8 100.00
_______________________________________________________________________________
-> rep78 = 3
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic
| 27 90.00 90.00
Foreign
| 3 10.00 100.00
------------+-----------------------------------
Total
| 30 100.00
_______________________________________________________________________________
-> rep78 = 4
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic
| 9 50.00 50.00
Foreign
| 9 50.00 100.00
------------+-----------------------------------
Total
| 18 100.00
_______________________________________________________________________________
-> rep78 = 5
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic
| 2 18.18 18.18
Foreign
| 9 81.82 100.00
------------+-----------------------------------
Total
| 11 100.00
_______________________________________________________________________________
-> rep78 = .
Car type
| Freq. Percent Cum.
------------+-----------------------------------
Domestic | 4 80.00 80.00
Foreign
| 1 20.00 100.00
------------+-----------------------------------
Total
| 5 100.00
.
----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: AW: st: AW: I want to obtain Tables with all categories of every variables
> Date: Sat, 31 Jan 2009 21:44:39 +0100
>
>
> <>
>
> Can you frame your prob in terms of the auto dataset? Like in
>
> *************
> sysuse auto, clear
> ta r f
> *************
>
> there are no foreign cars with repair record 1 or 2, and -tabulate- does
> show them as "0"... BTW, you might also want to look at -egen, group()-.
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von carmen gamarra
> Gesendet: Samstag, 31. Januar 2009 21:40
> An: stata list
> Betreff: RE: st: AW: I want to obtain Tables with all categories of every
> variables
>
>
>
>
>
> Sorry, I
> meant wrong. What I need is a command that allows me to get all the
> categories
> of one variable, including those with zero values.
>
> For
> example, if I want a table of groups by age stratified by sex, and suppose
> that
> in the group of males there isn’t value in the group of age 3, I want that
> the
> table includes the value of that category with zero value. This is possible?
>
>
>
> ----------------------------------------
>> From: [email protected]
>> To: [email protected]
>> Subject: st: AW: I want to obtain Tables with all categories of every
> variables
>> Date: Sat, 31 Jan 2009 21:04:56 +0100
>>
>> <>
>>
>> *************
>> tab1 _all
>> *************
>>
>> HTH
>> Martin
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [email protected]
>> [mailto:[email protected]] Im Auftrag von carmen
> gamarra
>> Gesendet: Samstag, 31. Januar 2009 21:01
>> An: stata list
>> Betreff: st: I want to obtain Tables with all categories of every
> variables
>>
>>
>>
>>
>>
>>
>> First, I
>> would like to thanks to all the people of this forum, always nice and
>> helpful.
>> Well, my problem now is very simple (really hope!), I want to obtain
> tables
>> with all categories of every variables, even those of value=zero
>>
>> how must I
>> proceed?
>>
>> Thanks in
>> advance
>>
>>
>>
>> _________________________________________________________________
>> Color coding for safety: Windows Live Hotmail alerts you to suspicious
>> email.
>>
> http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_
>> 112008
>> *
>> * 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/
>>
>>
>> *
>> * 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/
>
> _________________________________________________________________
> See how Windows® connects the people, information, and fun that are part of
> your life
> http://clk.atdmt.com/MRT/go/119463819/direct/01/
> *
> * 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/
>
>
> *
> * 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/
_________________________________________________________________
Color coding for safety: Windows Live Hotmail alerts you to suspicious email.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008
*
* 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/