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
Mixed-Effect Zero Inflated Negative Binomial model ??Hello, I have a study where I am evaluating the relationship between the total number of health care…
R-squared and -didregress-Good evening all, Is there a way to have -didregress- show a value for r-squared- as you would see …
Appending excel files - Error r(601)Hi. I am trying to append all excel files in a single folder into one big file, but the code below t…
Why does the asreg command give me values for the first observations of my sample even thought I specified a min?Hello everyone! I am using the asreg command to calculate betas using one year of daily data, but I…
Counts in a long dataset taking into account other variables including timeHello, I have a very large dataset that includes people ("personid") who could have been seen at 4 …
Subscribe to:
Post Comments (Atom)
0 Response to Generate var3 for if var1>var2
Post a Comment