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]

Re: st: how keep row variables even if they are missing


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how keep row variables even if they are missing
Date   Tue, 5 Apr 2011 09:47:29 +0200

Abu wrote me privately, but I will answer on statlist as suggested here:
http://www.stata.com/support/faqs/res/statalist.html#private

The "problem" is neither with -table- nor with any other command or
option. In fact it is not a problem, but exactly what you should
expect Stata to do. The code, that is used basicly reads:

table country hijra_grp, c(sum id sum us sum count), if  hijra>1428

Some countries do not appear in the table, but this is not because
-table- drops (or omits) observations, but because the if condition is
not satisfied for those countries. That is, there is no case in which
hijra > 1428 for those countries in the dataset. Since your are
telling Stata to run the command (-table- in this case) only on cases
that satisfy the if conditon, you do not find the countries in your
table.

I do not know how to change this behaviour nor do I think you want to
change it. Re-think the -if- statement and think of alternative ways
to get the desired statistics.

Best
Daniel
*
*   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