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
Robust Hausman TestHi, I was wondering if I have to run the Robust Hausman Test. Should I use the command 'xtoverid' o…
Use of binary explanatory (control) variables in Difference-in-Difference EstimationHi all, I am conducting a Diff-in-Diff with the following data, which is copied in here by using th…
replacing values in a loopDear All This is my first post on statalist. I have a household survey data (119,018 observations).…
How to get residuals series of many regressions?Hello, I want to run 500 regression in one command. dependent series are Y1 to Y500 and three indepe…
Multicollinearity and dummy variablesHello, first time poster here. Having a little trouble with something and was looking for a bit of h…
Subscribe to:
Post Comments (Atom)
0 Response to Loop
Post a Comment