interacting lagged variables
Posted: Mon May 08, 2017 1:35 pm
Hi,
Im making a horse race of a huge set of models of the form y = c + y(-1 to -n). So far I've been programming the models as:
for !n = 1 to 100
equation eq_{!n}.ls y c y(-1 to -!n)
next
the thing is that now I have to interact the lagged variables with a dummy "d". Is there anyway to do this in a simple way without writting all the equations down? for instance using something like:
for !n = 1 to 100
equation eq_{!n}.ls y c y(-1 to -!n) y(-1 to -!n)*d
next
Instead of writting
eq_1.ls y c y(-1) d*y(-1)
eq_2.ls y c y(-1) y(-2) d*y(-1) d*y(-2)
... and so on up to n=100
please take note that this is not the exact model that I want to estimate but just an example of what im trying to do.
Im making a horse race of a huge set of models of the form y = c + y(-1 to -n). So far I've been programming the models as:
for !n = 1 to 100
equation eq_{!n}.ls y c y(-1 to -!n)
next
the thing is that now I have to interact the lagged variables with a dummy "d". Is there anyway to do this in a simple way without writting all the equations down? for instance using something like:
for !n = 1 to 100
equation eq_{!n}.ls y c y(-1 to -!n) y(-1 to -!n)*d
next
Instead of writting
eq_1.ls y c y(-1) d*y(-1)
eq_2.ls y c y(-1) y(-2) d*y(-1) d*y(-2)
... and so on up to n=100
please take note that this is not the exact model that I want to estimate but just an example of what im trying to do.