[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: missing values included in conditions
And another weird thing I just noticed and wanted to confirm that it's my
mistake not Stata's :)
lets suppose we have a variable cond
cond
1
1
0
0
0
.
if I write
.. count if cond==1
it will of course return 2. But using
..count if cond
gives result 3, as Stata includes missing in count as well. Somehow I was
thinking that these two approaches were equivalent (and missings are always
excluded) but was proven wrong.
So should missings be treated as "True" in this kind of conditions?
Thanks again,
Zurab
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/