I just updated to Stata 15 and now a code I consistently use is broken. Have I overlooked something here, or did Stata 15 change loops?
Here is the code:
global xlist e1-e8
foreach var in $xlist {
recode `var' (1/2=1) (3=2) (4/5=3), gen(`var'_net)
However, I get this error message:
variable e1 already defined
r(110)
Previously, it would just create new variables for e1-e8 with "_net" at the end of each variable. Now it won't. Any advice?
Related Posts with Did Stata 15 Change Loops?
Doing Diff-in-Diff with lagged dependent using xtabondHi,
I'm doing a diff-in-diffs type of model with xtabond, but would be grateful for help establishin…
Structural Breaks in time-seriesHi everyone!
I really need your advice!! I have a multivariate time-series model with yearly observ…
Twoway line for tabulated resultsHello Everyone!
I am using stata 16 and my data us the demographic health survey women's module. I …
Forval loops with if-conditions in Panel dataHello together.
I am still struggling with my current research. I want to run the following code in…
Optimal cutoff lroc curve after probitDoes anyone know how to get the optimal cutoff point of lroc curve after a probit estimation?
…
Subscribe to:
Post Comments (Atom)
0 Response to Did Stata 15 Change Loops?
Post a Comment