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

st: Dropping variables with all observations missing


From   "Kim Gradel / Aalbog Sygehus" <[email protected]>
To   <[email protected]>
Subject   st: Dropping variables with all observations missing
Date   Mon, 25 Apr 2005 12:33:21 +0200

Dear Stata-listers,

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.  

Best regards, 

Kim 

Kim O. Gradel
DVM, PhD, clinical assistant
Department of Clinical Epidemiology 
Aalborg Hospital Nord
Stengade 10, 2. floor
9100 Aaalborg, Denmark
Phone, direct: +45 99 32 10 94
Fax: +45 99 32 10 88
E-mail: [email protected] 

*
*   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