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]
Re: st: how keep row variables even if they are missing
From
daniel klein <[email protected]>
To
[email protected]
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/