I am trying to make a new variable that shows if people have a higher value in one variable than another.
For example, ideally I would have
var1 var2 var3
0 0 .
2 0 1
2 2 .
4 17 0
5 1 1
3 5 0
Is there an egen command that allows this?
Thanks!
Tori
Related Posts with Generate var3 for if var1>var2
Variable Labels Hello dear forum members, I am new here and am currently learning Stata. I am a beginner and have o…
Values of multiple columns in one column using a loopHi everyone, I'd like to place all values of multiple columns in one column. I tried stack using a …
Problems creating Herfindahl-Hirschman IndexHello everyone, I want to create the Herfindahl-Hirschman Index for my data. I have quartlery data …
Create fiscal years from years and monthsDear Statalist, I would like to create a fiscal year variable that take values like 2005-06, 2006-…
Propensity Score matching: how to define the dependent variableHello everyone, we are trying to use propensity score matching (PSM) to find the suitable control gr…
Subscribe to:
Post Comments (Atom)
0 Response to Generate var3 for if var1>var2
Post a Comment