Page 1 of 1

Trouble with programming an ARMA estimation

Posted: Tue Nov 13, 2012 1:36 pm
by Colinear
Hi everyone !

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
My problem is that first it put the " " in red and then when I run the programm, it shows : Alpha series in specification - " " @EXPAND can convert to categorical dimmies in "EQUATION E.LS RCPILFESL C " "".


Thanks for your help :)

Re: Trouble with programming an ARMA estimation

Posted: Tue Nov 13, 2012 2:26 pm
by EViews Gareth
Change:

Code: Select all

equation e.ls rcpilfesl c %order
to be:

Code: Select all

equation e.ls rcpilfesl c {%order}

Re: Trouble with programming an ARMA estimation

Posted: Tue Nov 13, 2012 11:20 pm
by Colinear
Thanks for your help :)

I tried this, but it does not work :(

I still get the error message, but instead of
Alpha series in specification - " " @EXPAND can convert to categorical dimmies in "EQUATION E.LS RCPILFESL C " ""
I get
Alpha series in specification - (" ") @EXPAND can convert to categorical dimmies in "EQUATION E.LS RCPILFESL C (" ")"

What I don't understand is why I got red code when I write the code, such as :

....

if !p=0 then %order=" "
....

%order=%order+ "ar("+@str(!i)+")"

.....

if !q=0 then %order=%order+""

...

%order=%order+" ma("+@str(!i)+")"

....

equation e.ls rcpilfesl c (%order)
%order=" "

Re: Trouble with programming an ARMA estimation

Posted: Tue Nov 13, 2012 11:33 pm
by EViews Gareth
Post your whole program and workfile.

Re: Trouble with programming an ARMA estimation

Posted: Tue Nov 13, 2012 11:53 pm
by Colinear
Ok. Thanks Gareth. Here's my whole workfile. My goal here is to explain inflation by comparing ARMA model with macro model or VAR models and so on.

So here I would like to find an ARMA model for inflation. Inflation is dlog(cpilfesl) => rcpilfesl here.

Please don't have a heart attack about my code :P I am a very beginner with Eviews :(

Code: Select all

'creating workfile workfile projet m 1973:01 2012:09 cd J:\Projet read(B2,s=raw) rawseries.xls 13 'creating two spread series : spread3 et spread10 genr spread3=tb3ms-fedfunds genr spread10=gs10-fedfunds 'Unit Root testing indicates only four series to be stationary. genr rrahetpi=dlog(ahetpi,2) genr rcpilfesl=log(cpilfesl)-log(cpilfesl(-1)) genr rgoldam=log(goldam)-log(goldam(-1)) genr rindpro=log(indpro)-log(indpro(-1)) genr rm1sl=log(m1sl)-log(m1sl(-1)) genr roilprice=log(oilprice)-log(oilprice(-1)) genr rppiaco=log(ppiaco)-log(ppiaco(-1)) genr rtwexmmth=log(twexmmth)-log(twexmmth(-1)) genr rfedfunds=fedfunds-fedfunds(-1) genr rgs10=gs10-gs10(-1) genr rtb3ms=tb3ms-tb3ms(-1) 'Looking for the best ARMA model for Inflation 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

Re: Trouble with programming an ARMA estimation

Posted: Wed Nov 14, 2012 9:22 am
by EViews Gareth
There is no file attached.