Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: dropping variables with lots of missing


From   "Eric Uslaner" <euslaner@gvpt.umd.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: dropping variables with lots of missing
Date   Thu, 07 Jul 2011 10:38:56 -0400

Hi,

I've been following the threads of dropping variables with missing values--I know and have used Nick Cox's dropmiss for a long time.  But I also want to drop variables with lots of missing values.  I could not figure out how to save any results from his nmissing, but I tried this in a do-file with misstable:

 foreach var of varlist trustbanks-angergovtintervene {
  misstable sum `var'
  keep if r(K_uniq) >= 4
  }
  
and it winds up deleting all cases for all variables (only three variables have less than 4 observations).  What am I doing wrong?

Many thanks,

Ric




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index