Hi
I want to create a new variable (var3) using an existing variable (var2).
Like the attached photo
a, b = 1
c = 2
d, e = 3
I want to make it like this.
How should I use the command in stata 13 ?
It is not necessary to use the "if" command. Array
Related Posts with Generate new variable by command "if"
Different results for weighted median using same Stata Manual Methodology [Stata/SE 15.0]Hello everyone, I found something about weighted medians in Stata/SE. To my knowledge and what I ha…
Fama MacBeth with rolling betasHello, I would like to run a Fama-MacBeth regression with time varying betas and risk prices. I hav…
Control variables for difference-in-differenceHi all, I have been struggling to get help on this I have sales data during an intervention (the i…
nicelabels downloadable from SSCThanks as ever to Kit Baum, a new package nicelabels is now downloadable from SSC. It may be thought…
Exporting the table results of qrprocess to excel or wordHi STATALIST, I need advice on how I can export the table results of qrprocess to excel or word. R…
Subscribe to:
Post Comments (Atom)
0 Response to Generate new variable by command "if"
Post a Comment