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.
interacting lagged variables
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13306
- Joined: Tue Sep 16, 2008 5:38 pm
Re: interacting lagged variables
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.
Follow us on Twitter @IHSEViews
Re: interacting lagged variables
well thought! thanks!
Who is online
Users browsing this forum: No registered users and 26 guests