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
replacing values using the loops commands in stataHi Everyone, I am trying to replace missings in the GHI varibale by using this command Code: repl…
how to examine the moderating effect and plot the figure when iv is categorical variable and moderator is continuous variableAfter the regression, how to plot the moderating effect of w on the relationship between x and y? Th…
CI barhello, I want a barplot describing the prevalence of a bacteria by country and by site (rural/urban…
Does the analysis of “the impact of cross-regional flows on income” require a hierarchical linear model?My thesis is the impact of labor cross-regional mobility on income. The explanatory variable “cross-…
Temporal decomposition - Function using data from 2 different rows of a tableI want to do a temporal decomposition using STATA. Assume the following data below where x= y*z y…
Subscribe to:
Post Comments (Atom)
0 Response to Forval loop invalid syntax
Post a Comment