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?
Question about using linear mixed model to comparison mean fractional anisotropy for neuroimaging dataDear scientists, I have a question about how to compare mean for two different groups by using line…
Testing equality of coefficients from two identical instrumented regressions (ivreg2) estimated on different samplesDear Statalist: I am trying to make a comparison similar to that in Columns 1 and 2 of Table 6 in t…
how to use zanthro with further options on weight for length v.s. weight for height Hello, I run the following commands and did calculated weight for length: //egen WLZ_WHO=zanthro(we…
Lag Values Excluding ObservationHi, First, I am sorry for not being able to find a better title than this. But my problem is a litt…
Ramsey RESET TestSorry if this looks trivial, but what is the command to perform a Ramsey Regression Equation Specifi…
Subscribe to:
Post Comments (Atom)
0 Response to Did Stata 15 Change Loops?
Post a Comment