Page 1 of 1

interacting lagged variables

Posted: Mon May 08, 2017 1:35 pm
by pcruz
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.

Re: interacting lagged variables

Posted: Mon May 08, 2017 1:52 pm
by EViews Gareth

Code: Select all

for !n = 1 to 100 group interacts for !j=1 to !n interacts.add y(-!j)*dum next equation eq_{!n}.ls y c y(-1 to -!n) interacts d interacts next
or something similar.

Re: interacting lagged variables

Posted: Mon May 08, 2017 1:54 pm
by pcruz
well thought! thanks!