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
Difficulties with loop in a loop, feeding a matrix values through a loopHello, I am looking to fill a 4 by 5 matrix with the descriptive statistics (e.g. number of obs, max…
Random Marginal Agreement CoefficientHi everyone. I am comparing intra rater agreement between two continous variables, both predicted co…
Merge DifficultiesHello, I'm having difficulty merging together two data sets that contain population estimates for m…
Generating Rolling BetasHello! This is my first post on the forum, so please bare with me! I have a panel data set from 200…
Remove observations when there are more than 2 rows with the same IDHi, I have a data set that uniquely defines a household via 2 variables: conglome vivienda Within …
Subscribe to:
Post Comments (Atom)
0 Response to Generate var3 for if var1>var2
Post a Comment