Hello,
I am using forval code as below and then it says it is 'invalid syntax'. I checked that all the variables from macro with $ works fine with other codes. When I put the value of first equation without forval to check for that equation, it worked fine.
Do you see any error in this code below? thank you.
forval i = 1999/2017 {
gen com_bV`i'_1=(${Pi`i'_1}-${Pi`i'-1_1})*${rg`i'_1}
gen com_bV`i'_2=(${Pi`i'_2}-${Pi`i'-1_2})*${rg`i'_2}
}
Related Posts with Forval loop invalid syntax
How to present (in-)direct effects when using multilevel linear GSEMHello dear specialists of STATA, I'm going to test a mediate variable equalityrec in my model, and …
NetCourse® 101: Introduction to StataHey everyone! I would like to enroll myself for the Stata course that is basically designed for the …
Asking for some subsample tests approachesI am wondering how many subsample ways we have So far I know two approaches: 1> We can divide t…
Matching cases and controls 1:4Hello, Can someone please help me to match cases and controls on stata please? I have 4 controls fo…
Regressions and the coefficient of the constantHi everyone, I am currently performing crossectional regression on CARs (as a result of an event st…
Subscribe to:
Post Comments (Atom)
0 Response to Forval loop invalid syntax
Post a Comment