Rolling window regression

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Rolling window regression

Postby Pantera » Mon Dec 03, 2012 8:30 am

Hi all,
When I run the following rolling window regression:

!window = 20
!step = 1
!length = @obsrange
equation eq1
!nrolls = @round ((!length-!window)/!step)
matrix(3, !nrolls) coefmat
!j=0
for !i = 1 to !length -!window+1-!step step !step
!j=!j+1
smpl @first+!i-1 @first+!i + !window - 2
eq1. ls y c x1 x2
colplace(coefmat,eq1. @coefs,!j)
next
show coefmat

I receive the following error message:
"is not a member or procedure of EQ1 IN "EQ1" IN "DO_EQ1. LS Y C X1 X2".

Any suggestion how to solve the problem?

Regards,
P.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Rolling window regression

Postby EViews Gareth » Mon Dec 03, 2012 8:41 am

You have a space between "eq1." and "ls"

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Re: Rolling window regression

Postby Pantera » Tue Dec 04, 2012 2:58 am

Thanks a lot Gareth - the program is running without any trouble :) .

P.

tarun goel
Posts: 1
Joined: Tue Apr 30, 2013 2:53 am

Re: Rolling window regression

Postby tarun goel » Tue Apr 30, 2013 2:57 am

Hi all

I have run the following programme


!window = 40
!step = 1
!length = @obsrange
equation eq1
!nrolls = @round ((!length-!window)/!step)
matrix(2, !nrolls) coefmat
!j=0
for !i = 1 to !length -!window+1-!step step !step
!j=!j+1
smpl @first+!i-1 @first+!i + !window - 2
eq1.ls ldbenzene c ldcrude
colplace(coefmat,eq1. @coefs,!j)
next
show coefmat


I found this programe here only. Now, I want to plot the graph with 95% confidence interval. What is the way to do it. My concern value is of R2.
I also want to perform out of sample forecasting for my coefficients. Please help me, it is very important to for thesis.

Thanks
Tarun Goel


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests