Hello, I'm getting started into the Eviews programming and have an issue with telling Eviews to calculate multiple equations with lags of the independent variable. I did not find this in previous post, so I hope I'm not repeating a question made before.
I need to do this
Y C X1
Y C X1 X1(-1)
Y C X1 X1(-1) X1(-2)
Y C X1 X1(-1) X1(-2) X1(-3)
Y C X1 X1(-1) X1(-2) X1(-3) X1(-4)
Y C X1 X1(-1) X1(-2) X1(-3) X1(-4) X1(-5)
Y C X1 X1(-1) X1(-2) X1(-3) X1(-4) X1(-5) X1(-6)
.... and so on
therefore I created something like this:
series y=nrnd
series x=nrnd
for !i = -6 to -1
equation lag_x_(7+ { !i }).ls y c x_1({ !i } to 0)
next
Eviews do not allow me to name the equation in that way. I want that when the regression includes only one lag it will be lag_x_1 , and when I have the sixth lag it will be lag_x_6. Is there a way to do this?
Furthermore, after having the seven equation I would like to have them in a table with their respective coefficient and sd.
Thanks in advance for any help!
Several lags programming
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Several lags programming
Code: Select all
series y=nrnd
series x=nrnd
for !i = 1 to 6
equation lag_x_!i.ls y c x(0 to -!i)
next
-
AntonioAcha
- Posts: 21
- Joined: Wed Jan 07, 2015 8:49 am
Re: Several lags programming
Thanks you very much
Who is online
Users browsing this forum: No registered users and 0 guests
