Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: new command -checkfor2-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: new command -checkfor2-
Date   Mon, 19 Sep 2005 22:24:08 +0100

Note also that both numeric and 
string missings are caught by -mi()-. 

Nick 
[email protected] 

Kit Baum
 
> Easier, and nmissing (appropriately updated) gives the right answer,  
> which count does not...
> 
> Note that the count statement as given does not tell you how many  
> missing values there are; it tells you how many are equal to ".".  
> There are 27 kinds of missing values in Stata, and if you want to  
> trap all of them,
> 
> count if !(x<.)
> 
> is needed:
> 
> . tab rep78,missing
> 
>       Repair |
> Record 1978 |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>            1 |          2        2.70        2.70
>            2 |          8       10.81       13.51
>            3 |         29       39.19       52.70
>            4 |         18       24.32       77.03
>            5 |         11       14.86       91.89
>            . |          4        5.41       97.30
>           .a |          1        1.35       98.65
>           .b |          1        1.35      100.00
> ------------+-----------------------------------
>        Total |         74      100.00
> 
> . count if rep78 == .
>      4
> 
> . count if !(rep78<.)
>      6
> 

*
*   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/



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