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]
st: RE: if
From
"Jesper Lindhardsen" <[email protected]>
To
<[email protected]>
Subject
st: RE: if
Date
Tue, 18 Oct 2011 10:41:17 +0200
See inlist function (-help inlist-)
HTH Jesper
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bulent Koksal
Sent: 18 October 2011 10:32
To: [email protected]
Subject: st: if
Dear Stata Users,
In SAS I can write a command like
if bankid in (2,25,46,76) then newvar=1; else newvar=0;
How can I do this in Stata? I don't want to keep writing bankid ==2 |
bankid==25 etc.
any easy way of doing this? Thank for any help.
--
Bülent Köksal
*
* 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/
*
* 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/