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
Stats & FrequencySo I have a category named "Code" and there are 5 subgroups. I want to find the following: For vari…
convert long string to numeric (not exp)I think this should be simple, but cannot figure it out. I want to: remove a character from a string…
xtreg - baseline values for explanatory variablesIs there a way to set baseline values for explanatory variables when one is undertaking an xtreg in …
Panel Data - Continuous Variable - Fixed EffectsHi everybody, so I have longitudinal panel data with 370 different firms over 6 years. I want to res…
Finding the _b[coefficient] from the first-stage of ivreg2Dear all, I am trying to figure out how we can refer to a specific coefficient from the first-stage…
Subscribe to:
Post Comments (Atom)
0 Response to Forval loop invalid syntax
Post a Comment