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
Variance function regression using HAPC (age-period-cohort) Hi Statalist, I am attempting to run a model on stata, specifically, a Variance function regressio…
Export Stata Results to Word using TaboutDear Statalisters, I wish to export the results of the tabulate command to a Word file using the ta…
A Statalist glossary This is a revision of a glossary that appeared on 1 January 2011. Striking (to me any way) that mos…
How to set 3 way panel and run triple difference regression?Hi everyone, I've got a dataset which varies across time, across country and across products (trade …
Negative margins value with penalized maximumlikelihood estimatesHello, I've tried the logit with a binary variable but I found out that the sample size is only 95. …
Subscribe to:
Post Comments (Atom)
0 Response to has problem with : recode with more than one if condition
Post a Comment