Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: missing values included in conditions

From   "Zurab Sajaia" <[email protected]>
To   [email protected]
Subject   st: missing values included in conditions
Date   Fri, 08 Sep 2006 11:36:15 -0400

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


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,

* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index