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
ploting the panel data by using "LPM" methodhello everyone, I use the "local projection method " for estimating the effect of the crisis on fert…
Reading xml filesDear all, It's the first time that I'm trying to work with xml files. Unfortunately, in this post I…
Trade signals time series dataHi! I have a question regarding the following; I have obtained buy signals from stock data for every…
Probit Regression and Reverse CausalityI have a concern using a probit model. In short, I am using cross-sectional data to investigate the …
Generating new dummy var in an individual level dataset that gives country-year level information for each individualHello, I have individual-level data that looks like this: indiv_id country_code indiv_disc_dummy…
Subscribe to:
Post Comments (Atom)
0 Response to has problem with : recode with more than one if condition
Post a Comment