Wald test in rolling regression

For questions regarding programming in the EViews programming language.

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

luckygift2002
Posts: 7
Joined: Mon Feb 22, 2010 2:21 pm

Wald test in rolling regression

Postby luckygift2002 » Sat Dec 17, 2011 1:29 pm

Dear all,

I would like to perform the wald test and save the test statistics in the rolling regression.

The standard wald test for i=1 to 145 would be the following:


for !i=1 to 145
eq{!i}.cointreg( method=dols, trend=linear, cov=hac, nodf, lag=4, lead=4)
freeze(waldtable) eq{!i}.wald c(3)=0
walds(!rowcounter,1) = @val(waldtable(6,2))
!rowcounter=!rowcounter+1
d waldtable
next

But I do not know how to modify the code when I do the following rolling regression:
My code as follows:


!window = 50
!step = 1
!length = @obsrange
equation eq1

!nrolls = 172
matrix(2,!nrolls) coefmat
!j=0
for !i = 1 to 172 step !step
!j=!j+1
smpl @first+!i-1 @first+!i+!window-2

eq1.cointreg( method=dols, trend=constant, nodf, lag=4, lead=4) ln_real_rev_sa ln_real_exp_sa

colplace(coefmat,eq1.@coefs,!j)
next
show coefmat

Can anyone help? Thank you very much,

Jing

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

Re: Wald test in rolling regression

Postby EViews Gareth » Mon Dec 19, 2011 8:59 am

I don't understand the question.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests