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
Timeseries - cumulative impactI have been using Regression with Newey-West standard errors Code: newey for time-series regressi…
How to create a dummy variable from two variablesHi! I have a dataset with two variables for test scores: scores in 2002 and scores in 2013. I want n…
Cox proportional hazards model a non constant covariateDear stata listers I'm using stata to analyse time-to-event data. Specifically, I'm trying to relat…
IVQREG2: module to estimare structural quantile functions now available in SSCDear All: Thanks to Kit Baum, ivqreg2 is now available in SSC. This module estimates the structura…
Adding percentiles to boxplotsHello, I am using this code for boxplots - graph box , /// over(month, relabel()) /// title …
Subscribe to:
Post Comments (Atom)
0 Response to has problem with : recode with more than one if condition
Post a Comment