Please advise how I can create a loop for the following 3 similar syntax
gen ethos_1rough90=0
replace ethos_1rough90=1 if ethos_1rough==1 & episode90==1
gen ethos_2emerg90=0
replace ethos_2emerg90=1 if ethos_2emerg==1 & episode90==1
gen ethos_3temp90=0
replace ethos_3temp90=1 if ethos_3temp==1 & episode90==1
Related Posts with Loop
issue with "svy: biprobit"Hi everyone, I have a longitudinal panel data with the person-spell format where a spell is defined …
Panel Data Analysis: Growth rates or levels?Hi Statalist-community! I am currently writing a seminar paper. I am estimating the effect of the s…
semi-parametric quantile modelHi, How to run semi-parametric quantile regression in Stata? There is a way to run semi-parametric …
Extracting a month/year variable from a dateI'm new to Stata and I have a dumb question. I have a date variable (indexdate) with the format %tdD…
Append all .dta files in directoryMany people asked this quesion on 'batch appending' in many ways. Some of them are obscure so I trie…
Subscribe to:
Post Comments (Atom)
0 Response to Loop
Post a Comment