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

st: Re: ST: sum over observations


From   "Eric Uslaner" <[email protected]>
To   <[email protected]>
Subject   st: Re: ST: sum over observations
Date   Tue, 08 Feb 2005 11:19:26 -0500

Hi,

I have a very large data set with about 2000 variables.  Periodically I
want to examine which variables have missing values on the fewest number
of cases.  I use sum or fsum but this requires lisitng all of the
variables.  Suppose, for a data set of 101 cases, I wish to find out
which variables have 80 or more cases.  I would like something like:

sum if (number of cases) >= 80

I know that nmissing can do this, but it too lists all of the
variables.  And the number of variables is too large to create a new
variable for the number of missing (or nonmissing) cases for each
variable.  Any suggestions?  Many thanks.

Ric



Ric Uslaner
Department of Government and Politics
University of Maryland
College Park, MD 20742
office phone: 301-405-4151
home phone 301-279-0414
office fax: 301-314-9690
home fax: 301-279-2614
e-mail: [email protected]
home page: http://www.bsos.umd.edu/gvpt/uslaner
*
*   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