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

From |
"Svend Juul" <SJ@SOCI.AU.DK> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: the -missing- command |

Date |
Mon, 10 Oct 2005 20:06:00 +0200 |

Louis wrote: I'm not clear about exactly what -missing- does. An example will clarify my concern. I have a dataset containing 11 variables (the first is -clust- and the last is -s11aq13-). One of the variables is -trexpcd-, and the total number of observations is 4872. I gave the following commands and had the shown output: count if mi(trexpcd) 4649 count if mi(clust-s11aq13) 82 My understanding of the online -help- is that -missing- evaluates the number of observations for which any of the arguments is missing. So, for the second command, since -trexpcd- is one of the arguments, I expected the result to be a number which is at least equal to 4649. -------------------------------------------------------------- hmm! It looks a bit strange. I tried this: . sysuse auto (1978 Automobile Data) . count if missing(rep78) 5 . count if missing(mpg, rep78, headroom) 5 . count if missing(rep78-headroom) 5 . count if missing(mpg-headroom) 0 . count if missing(mpg-rep78) 5 According to the documentation -missing()- takes a list of arguments, separated by commas. The arguments may be variable names, but not in a variable list form, so mpg-headroom ought to be illegal. Apparently missing() accepted mpg-headroom, but examined only mpg and headroom, not the intervening rep78. I checked it both on Stata 8.2 and 9.1; both versions have the same behavior. -egen-s rmiss() function (rowmiss() in version 9) takes a variable list as arguments, and that may be what you need. Confused? I am a bit myself. Svend _______________________________________________________ Svend Juul Institut for Folkesundhed, Afdeling for Epidemiologi (Institute of Public Health, Department of Epidemiology) Vennelyst Boulevard 6 DK-8000 Aarhus C, Denmark Phone, work: +45 8942 6090 Phone, home: +45 8693 7796 Fax: +45 8613 1580 E-mail: sj@soci.au.dk _________________________________________________________ * * 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/

**Follow-Ups**:**Re: st: the -missing- command***From:*"louis boakye-yiadom" <louisby@hotmail.com>

- Prev by Date:
**Re: st: Variable patterns and observed frequencies** - Next by Date:
**Re: st: A tricky case (tricky to me)** - Previous by thread:
**RE: st: the -missing- command** - Next by thread:
**Re: st: the -missing- command** - Index(es):

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