Iam having the following coding problem:
I am trying to regress a variable of a certain year over a variable of the previous year.
In the following code,
FOR !j=2 to 5
FOR !I=7 TO 12
equation W_B_Q!j_!I_ALL.ls bq!j_!i c yaq!j_!i-1
next
next
!I=7 TO 12 represents years 7 to 12, and !j represnts quintiles, so for a given quintile (say j=2) and for year 7 I want the following regression:
W_B_Q2_7_ALL.ls bq2_7 c yaq2_6
Simply placing "-1" after !i in order to have the year 6 variable is not working - comparing the two regressions output (one with and onw without the "-1" yield the same exact output, except for the constant term statistics. (I do not want the lagged series of year 7, so yaq!j_!i(-1) is not what I'm looking for).
Any suggestions?
Thank you for your help in advance
Regressiosn between lagged variables using code
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
kipfilet_09
- Posts: 10
- Joined: Wed Oct 01, 2014 12:20 pm
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Regressiosn between lagged variables using code
Code: Select all
FOR !j=2 to 5
FOR !I=7 TO 12
!k = !i-1
equation W_B_Q!j_!I_ALL.ls bq!j_!i c yaq!j_!k
next
next
-
kipfilet_09
- Posts: 10
- Joined: Wed Oct 01, 2014 12:20 pm
Re: Regressiosn between lagged variables using code
Thank you Gareth!
I found out myself using the exact same code just a day before!
I found out myself using the exact same code just a day before!
Who is online
Users browsing this forum: No registered users and 2 guests
