Hi,
In ACCESS the IIF function returns one value if a specified condition
evaluates to TRUE, or another value if it evaluates to FALSE:
IIF (condition, value_if_true, value_if_false)
condition is the value that you want to test.
value_if_true is the value that is returned if condition evaluates to TRUE.
value_if_false is the value that is return if condition evaluates to FALSE
I'm looking for a similar function in STATA in order to set a variable to
two different values based on a condition test.
Is there such a function existing? Or, any other easy way to work this out?
Thank you very much.
Weiwei
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/