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"
Interpreting multilevel mixed-effects linear regressionHi, I am doing medical research and I am currently facing some challenges. I have received help fr…
LoopHello Stata-Community, I have a varlist called 'surgery' containing numbers from 1-5. I would like …
Intra-Day Data SummationHi, I am working with the following sample of intra-day data: Code: * Example generated by -dataex-…
Calculating average of variables from different years I would like to generate a variable equal to the simple average of some other variables. Problem is…
CAR tesingHello, I would like to test whether the event CAR (cumulative abnormal return) is equal to zero. Is …
Subscribe to:
Post Comments (Atom)
0 Response to Generate new variable by command "if"
Post a Comment