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

From |
"louis boakye-yiadom" <louisby@hotmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Mon, 10 Oct 2005 20:00:19 +0000 |

Svend, thanks for the reply. I think you've identified the problem correctly. Whilst waiting for a response, I tried giving various -missing- commands with the list of arguments separated by commas, and the outputs were not confusing. So, as you noted, it appears (at least in version 8.2) that arguments in -missing()- must be separated by commas. That, however, can be inconvenient if one has to type many arguments, not the mention the risk of skipping one or more. Thanks for your insights.

Louis

From: "Svend Juul" <SJ@SOCI.AU.DK> 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

* * 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:*"Michael Blasnik" <michael.blasnik@verizon.net>

**References**:**Re: st: the -missing- command***From:*"Svend Juul" <SJ@SOCI.AU.DK>

- Prev by Date:
**Re: st: A tricky case (tricky to me)** - 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–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |