Dear All,
I have two variables V1 and V2 .
V2 has the option (1= Control , 2= CBE, 3=Government)
I want to recode some value in V1 with "if" condition according to three different Options, it works in separate line of code as following:
recode V1 (5=9)(6=10) if V2==1
recode V1 (5=7)(6=8) if V2==2
recode V1 (5=6)(6=6) if V2==3
but how can I do all the above mentioned three lines codes in one line code to do the above mentioned action. does recode accept more than one if condition
Kindest Regards,
Yousufzai
Related Posts with has problem with : recode with more than one if condition
Difference and Difference Design Model SpecificationHey everyone, I have a question concerning a model specification for a Difference and Difference De…
LaTeX font on eps figures: cannot get writepsfrag package to workHello, I cannot get writepsfrag to work. I am trying to have the same fonts on my Stata-produced fi…
Which F stats should I look at with ivlasso?Hi, I'm running IV regression with ivlasso in Stata. It reports several different first stage F sta…
Dropping multiple missing observationsCurrently I'm working on a project in which I use Item response theory. I have 8 variables from a lo…
Expanding a time series dataset by one monthHi, I have panel data and I would like to expand the dataset by one month. So I would like to expan…
Subscribe to:
Post Comments (Atom)
0 Response to has problem with : recode with more than one if condition
Post a Comment