[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Simplifying multiple cases of the if command
Hi all.
This might be a very easy question, but if I have a number of things
that have to hold when generating a variable, is there a way to
simplify the following?
generate variable if news== 1 | news == 3 | news ==5
to something like
generate variable if news == 1 | 3 | 5? I tried this
Thanks!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/