I have a question and a Problem.
In this loop i tried to make an 1 step recursive OOS AR(2) forecast with an intercept a trend and two dummy variables.
Eviews is doing this loop, but Its writing 1 forecast more than I need, but the forecast error has the right length.
Is there something wrong ?
Code: Select all
series rmse=0
series mae=0
for !i=179 to 215
smpl @first @first+!i
equation eq1.ls y c d1 d2 @trend y(-1) y(-2)
series fy(!i+1)=c(1)+d1(!i)*c(2)+d2(!i)*c(3)+c(4)*!i+c(5)*y(!i)+c(6)*y(!i-1)
series u1(!i+1)=y(!i+1)-fy(!i+1)
series rmse(!i+1)=u1(!i+1)^2+rmse(!i)
series mae(!i+1)=abs(u1(!i+1))+mae(!i)
next
scalar MMAE=1/36*mae(216)
scalar RRMSE=(rmse(216)/36)^(1/2)
