Another way to do it:
You can identify any observations with zeros with
. egen zero = eqany(v1-v300), v(0)
and any with missings with
. egen miss = rmiss(v1-v300)
allowing
. tabstat v1-v300 if !zero & !miss
That leaves your original variables unchanged.
Nick
[email protected]
P.S. for wider context and some related problems, see
http://www.stata.com/support/faqs/data/selectid.html
and
http://www.stata.com/support/faqs/data/characteristics.html
Ulrich Kohler
> Something like
>
> . mvdecode v1-v300, mv(0)
> . mark touse
> . markout touse v1-v300
> . tabstat varlist if touse
Rod Hunter
> > I have, say, 500 observations and 300 variables. I want
> to do a TABSTSAT
> > that has an IF condition such that any observation is not
> to be included
> > in the tabstat if the value of any variable is zero or
> missing. I know
> > how I can do this the long way, but could someone tell me
> how, or where
> > I can find out how I can use an operaion that would save
> me having to
> > list each of the 300 variables in the IF condition?
*
* 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/