Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Thomas Speidel <thomas@tmbx.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Evaluating a set of conditions |
Date | Wed, 16 Jun 2010 16:41:02 -0600 |
do something if A==1 & (B>2 & B<.) & (C==1 | D!=2)these expression can become lengthy and one can think of more elegant ways to come to the same results. cond and inrange are the first things that come to my mind that may (or may not) simplify the problem, but I hardly ever use them because understanding them (or remembering them) usually takes longer then writing the 'lengthy' qualifiers. To complicate matters one has to account for missing values. Admittedly, this question came about from the recent topic on missing values.
If someone want to share an example, please do so. -- Thomas Speidel * * 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/