Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: table command and missing values in row variable
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: RE: table command and missing values in row variable
Date
Wed, 26 May 2010 21:38:17 +0200
<>
Try this code to see the real meaning of -concise-:
***********
sysuse auto, clear
replace mpg=. if rep78==1
table rep78 foreign, contents(mean mpg )
table rep78 foreign, contents(mean mpg) concise
***********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jeremy Page
Sent: Mittwoch, 26. Mai 2010 21:25
To: [email protected]
Subject: st: table command and missing values in row variable
Hello Everybody,
I am using Stata/SE 10.1 with Windows XP. I am attempting to create a
table using the -table- command with a row variable which has missing
values. I would like the missing value of the row variable to be
included in the table, but when I use -table- the missing observations
are not shown in the table. I am a little confused at why the missing
values don't appear in the table. In the help section there is an
option called -concise- which is supposed to "suppress rows with all
missing entries." This leads me to believe that the table command
without the -concise- option should list the missing values. Am I
interpreting the help file incorrectly? I have reproduced my problem
using the auto data. I have included my .do file and log below.
When I run a two way -tab- with "rep78", "foreign" and I include the
missing option I see the missing values of "rep78". When I use
-table- the missing values of "rep78" are suppressed with or without
the option -concise-.
Thanks for your input.
Best,
Jeremy
************do**************
clear all
webuse auto
tab rep78 foreign,m
table rep78 foreign
table rep78 foreign, concise
***********log ****************
. clear all
.
. webuse auto
(1978 Automobile Data)
.
. tab rep78 foreign,m
Repair |
Record | Car type
1978 | Domestic Foreign | Total
-----------+------------------
----+----------
1 | 2 0 | 2
2 | 8 0 | 8
3 | 27 3 | 30
4 | 9 9 | 18
5 | 2 9 | 11
. | 4 1 | 5
-----------+----------------------+----------
Total | 52 22 | 74
.
.
. table rep78 foreign
------------------------------
Repair |
Record | Car type
1978 | Domestic Foreign
----------+-------------------
1 | 2
2 | 8
3 | 27 3
4 | 9 9
5 | 2 9
------------------------------
. table rep78 foreign, concise
------------------------------
Repair |
Record | Car type
1978 | Domestic Foreign
----------+-------------------
1 | 2
2 | 8
3 | 27 3
4 | 9 9
5 | 2 9
------------------------------
*
* 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/