Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: drop variable on condition


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: drop variable on condition
Date   Mon, 28 Jul 2008 18:54:20 +0100

In addition to other answers, see -dropmiss- from STB-60. 

Nick
n.j.cox@durham.ac.uk 

Andrea Bennett

A quick question related to dropping variables: I would like to drop a  
variable when a certain condition is met (I'm using loops to check  
whether a variable is not empty for each year of observation). AFAIK, - 
drop- and -keep- only refer to observations if being used  
conditionally, e.g. I cannot use "drop THISVAR if mean_THISVAR<1".

So, how can I drop a variable when a certain condition is met?


*
*   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   |   What's new   |   Site index