Regressiosn between lagged variables using code
Posted: Sat Oct 11, 2014 9:23 am
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
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