-dropmiss- is a user-written command,
so you would need to install it.
. search dropmiss
is the way to start that.
Nick
[email protected]
Joseph Coveney replied to Kim Gradel
> After having merged and reshaped a few datasets I ended up with a
> dataset of 150 observations and 955 variables. I want to drop the
> numerous variables that have only missing observations. It's
> tedious to
> look through all these variables to find those with 150 missing
> observations, and I wonder if there is a short and conveniant command
> related to "drop" or "keep" that I can use to drop all variables where
> all observations are missing.
> -dropmiss- will do it. Or you can write a routine easily enough.
>
> Joseph Coveney
>
> foreach var of varlist _all {
> capture assert mi(`var')
> if !_rc {
> drop `var'
> }
> }
*
* 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/