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]

RE: st: RE: AW: RE: Evaluating a set of conditions


From   "Clyde Schechter" <clyde.schechter@einstein.yu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: RE: AW: RE: Evaluating a set of conditions
Date   Thu, 24 Jun 2010 14:19:55 -0700

While I think the solutions posed by others so far will do the trick here,
they lack generality.  I have confronted this problem frequently, and I
believe what you need to do is simulate 3-valued logic.  Here is some code
that can be easily generalized.  I start with a data set containing your
variables id a b c d e.

local criteria a b c d e
foreach v of varlist `criteria' {
     tempvar `v'



Clyde Schechter, MA MD
Associate Professor of Family & Social Medicine

Please note new e-mail address: clyde.schechter@einstein.yu.edu

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