Statalist


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

st: drop variable on condition


From   Andrea Bennett <mac.stata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: drop variable on condition
Date   Mon, 21 Jul 2008 12:08:33 +0200

Hi!

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?

Many thanks for your condsideratons,

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