Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: table command and missing values in row variable


From   Jeremy Page <miahpage@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: table command and missing values in row variable
Date   Wed, 26 May 2010 15:25:18 -0400

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index