Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[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" <[email protected]>
To
[email protected]
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: [email protected]
*
* 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/