I am using Eviews 7
I am trying to estimate ARMA(p,q) models for p=1 to 12 and q=1 to 12, and then report all the 144 AIC criterion into a matrix. This is my code :
Code: Select all
scalar pmax=12
scalar qmax=12
matrix(pmax+1,qmax+1) aic
for !p=0 to pmax
for !q=0 to qmax
if !p=0 then %order=" "
else
for !i=1 to !p
%order=%order+" ar("+@str(!i)+")"
next
endif
if !q=0 then %order=%order+" "
else
for !i=1 to !q
%order=%order+" ma("+@str(!i)+")"
next
endif
equation e.ls rcpilfesl c %order
%order=" "
aic(!p+1,!q+1)=e.@aic
next
next
delete e
Thanks for your help :)
