Bookmark and Share

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: "If" in a local variable


From   Laurie Molina <[email protected]>
To   [email protected]
Subject   st: "If" in a local variable
Date   Mon, 29 Nov 2010 20:39:53 -0600

Hello all,

I want to set the value of a local variable, conditional of the value
of some other variable, but i think the option "if" is not availabe
for a local variable.
What i would like to do is the following:
local a= 1 if `b' > `c'
local a= 2 if `b' < = `c'

Any idea of how can i get those conditional values for the local variable `a'?

Thank you all in advance!

LM
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index