Hi, I wish to create a new variable given certain parameters of 3 other variables.
I have tried the basic creation of a new variable commands "gen highscore = . / replace highscore = 0 if (varA <1)
[I can get that far, but what I need is something essentially like the following - but the syntax doesn't work):
replace highscore = 0 if (varA <=1) or if (varB <=10) or if (varC >= 10)
Is there a way to fix this syntax?
Thanks for any and all help - I am sure the answer is pretty straightforward.
Related Posts with generating variables with "or"
data management, creating new variables in one data set based on information in another data baseHello All, I hope this email finds you well! I have two databases one includes my raw data, and th…
Optimal cutoff pointHello, I'm trying to figure out how to calculate a change in cut-off score for a screening test whe…
match age and genderHello, I would like to know how to match 2:1 for age and gender using same sample of individuals. I …
GLS for non-linear equationln (Pit) = a*ln(Rit + b*Vit) + uit I want to estimate a, b for wide panel data (i = 1~16, t = 2007~…
Graph bar - Set different colors within an -over()- optionHi there, Suppose we're working with these data, Code: use http://www.stata-press.com/data/r13/g…
Subscribe to:
Post Comments (Atom)
0 Response to generating variables with "or"
Post a Comment