Page 1 of 1

Simple MA Loop

Posted: Tue Jul 19, 2011 11:46 pm
by blue2011
Dear Eviews User

I have a simple question regarding the following problem. I have been staring at it for so long, but could not figure it out yet.

for !j=2 to 24
ar_ma{!j}.ls cinf c AR(1) MA(1) MA(!j)
ar_ma{!j}.makeresids arma{!j}
next

With the code above, I would like to first estimate ARMA(1,(1,2)), later ARMA (1,(1,3)).....ARMA(1,(1,24)), but it kept giving me errors. I would appreciate your help with this estimation.

Thanks!

Re: Simple MA Loop

Posted: Wed Jul 20, 2011 7:59 am
by EViews Gareth
Obviously we can't tell without seeing the whole program, but are you declaring the equation objects anywhere?

Otherwise, you'd have to modify your code to be:

Code: Select all

for !j=2 to 24 equation ar_ma{!j}.ls cinf c AR(1) MA(1) MA(!j) ar_ma{!j}.makeresids arma{!j} next

Re: Simple MA Loop

Posted: Thu Jul 21, 2011 5:54 am
by blue2011
Thanks Gareth. You are great! It works fine now.