string for model specification in equation environment
Posted: Wed Mar 26, 2014 9:49 am
Hi
is it possible to use a string instead of manually writing down the model specification in and equation environment?`
Easy example, suppose this is the regression I want to run
can I replace the model specification ie everything after "equ1.ls" with a string?
I have extracted the optimal model specification and lag structure for multitude of dependent variables, and the way it's set up is that the explanatory variables are enlisted in a string object. Most efficiently I would be able to incorporate this string into a loop, but I don't know if the equation environment lets me do so.
Easy example, let "_equ_y" be the string containing the optimal model specification eg.: "y c @movav(x1(0),3) x2"
obviously only returns the alpha values in the string. Ideas?
is it possible to use a string instead of manually writing down the model specification in and equation environment?`
Easy example, suppose this is the regression I want to run
Code: Select all
equation equ1.ls y c @movav(x1(0),3) x2
I have extracted the optimal model specification and lag structure for multitude of dependent variables, and the way it's set up is that the explanatory variables are enlisted in a string object. Most efficiently I would be able to incorporate this string into a loop, but I don't know if the equation environment lets me do so.
Easy example, let "_equ_y" be the string containing the optimal model specification eg.: "y c @movav(x1(0),3) x2"
Code: Select all
for %bestvar {_equ_y}
equation _equ1_y.ls %bestvar
show equ1_y_
next