I'd like to excute a rolling regressions on time series data that i generated myself with 'ici' as time series variable (see the program code below). The coefficients that i've used to generate the data are obtained from an earlier estimation. I'd like to store the estimated regression coefficients for the sample 3 january 2007 - 4 january 2007, 3 january 2007 - 5 january 2007, ...., 3 january 2007 - 7 july 2007 in a matrix. When i run the program, there are no errors but Eviews doesn't give me any estimations of coefficients i.e. i get a matrix with the value 0 in all its cells. I tried several things but i can't find the flaw. So my question: what is the problem and are there maybe better/easier programs to execute what i have in mind?
Thanks for those who have solution!
Rick
smpl 01/03/2007 08/07/2007
genr e = nrnd
smpl 01/03/2007 01/03/2007
genr ici = 0
smpl 01/03/2007 07/08/2007
ici = 0.389089 + 0.751592*ici(-1) + e
matrix(151,2) coefficients
for !i = 1 to !i = 150
!i = !i + 1
smpl 01/03/2007 01/04/2007+i-1
equation rollingestimators.ls ici c ici(-1)
rowplace(coefficients,rollingschatters.@coeffs,!i)
next
show coefficients
A running regressions which refuses OLS
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: A running regressions which refuses OLS
Looks like you change the name of the equation.equation rollingestimators.ls ici c ici(-1)
rowplace(coefficients,rollingschatters.@coeffs,!i)
Re: A running regressions which refuses OLS
i see: i made a mistake in the translation to English so the variables in are inconsistent in the code i presented. But in the code i runned these variables are consisten. So that is not to problem. Someone else already found the problem?Looks like you change the name of the equation.equation rollingestimators.ls ici c ici(-1)
rowplace(coefficients,rollingschatters.@coeffs,!i)
Thanks anyway!
Re: A running regressions which refuses OLS
So: to adjust the code i presented in my first post, here is the 'right' code (that still doesn't work).
I'd like to excute a rolling regressions on time series data that i generated myself with 'ici' as time series variable (see the program code below). The coefficients that i've used to generate the data are obtained from an earlier estimation. I'd like to store the estimated regression coefficients for the sample 3 january 2007 - 4 january 2007, 3 january 2007 - 5 january 2007, ...., 3 january 2007 - 7 july 2007 in a matrix. When i run the program, there are no errors but Eviews doesn't give me any estimations of coefficients i.e. i get a matrix with the value 0 in all its cells. I tried several things but i can't find the flaw. So my question: what is the problem and are there maybe better/easier programs to execute what i have in mind?
Thanks for those who have solution!
Rick
smpl 01/03/2007 08/07/2007
genr e = nrnd
smpl 01/03/2007 01/03/2007
genr ici = 0
smpl 01/03/2007 07/08/2007
ici = 0.389089 + 0.751592*ici(-1) + e
matrix(151,2) coefficients
for !i = 1 to !i = 150
!i = !i + 1
smpl 01/03/2007 01/04/2007+i-1
equation rollingestimators.ls ici c ici(-1)
rowplace(coefficients,rollingestimators.@coeffs,!i)
next
show coefficients
I'd like to excute a rolling regressions on time series data that i generated myself with 'ici' as time series variable (see the program code below). The coefficients that i've used to generate the data are obtained from an earlier estimation. I'd like to store the estimated regression coefficients for the sample 3 january 2007 - 4 january 2007, 3 january 2007 - 5 january 2007, ...., 3 january 2007 - 7 july 2007 in a matrix. When i run the program, there are no errors but Eviews doesn't give me any estimations of coefficients i.e. i get a matrix with the value 0 in all its cells. I tried several things but i can't find the flaw. So my question: what is the problem and are there maybe better/easier programs to execute what i have in mind?
Thanks for those who have solution!
Rick
smpl 01/03/2007 08/07/2007
genr e = nrnd
smpl 01/03/2007 01/03/2007
genr ici = 0
smpl 01/03/2007 07/08/2007
ici = 0.389089 + 0.751592*ici(-1) + e
matrix(151,2) coefficients
for !i = 1 to !i = 150
!i = !i + 1
smpl 01/03/2007 01/04/2007+i-1
equation rollingestimators.ls ici c ici(-1)
rowplace(coefficients,rollingestimators.@coeffs,!i)
next
show coefficients
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: A running regressions which refuses OLS
The equation member @coefs only has one "f." I'm not sure it produces a row vector.
Re: A running regressions which refuses OLS
I changed it in to @coefs. I still get a matrix with 151 rows and 2 columns with all zeros. The code simulates the data but it still doesn't give me any regression results.The equation member @coefs only has one "f." I'm not sure it produces a row vector.
Who is online
Users browsing this forum: No registered users and 2 guests
