Ian,
You can use -dropmiss-.
. findit dropmiss
Friedrich Huebler
--- Ian Watson <[email protected]> wrote:
> My particular task is to eliminate all variables from the dataset
> which are empty, that is, have no observations. The following bit
> of code has done this, but surely there is a simpler way which I
> have overlooked?
>
> local droplist "drop "
> foreach v of varlist * {
> qui count if !mi(`v')
> if r(N) == 0 local droplist "`droplist' `v'"
> }
> `droplist'
>
>
> --
> Kind regards,
> Ian
>
> -------------------------------
> Ian Watson
> Senior Researcher
> acirrt, University of Sydney
> NSW, 2006, Australia
>
> phone: 02 9351 5622
> email:[email protected]
> www.acirrt.com
> -------------------------------
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
*
* 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/