Page 1 of 1

programm to estimate a serie using aic...

Posted: Sat Jan 03, 2009 5:42 am
by hnida
Hi, i am trying to write a program that can estimate different arma for my series, then i would like to create a table where i can put the aic criterium from the differents equations so i would be able to to compare the aic values and choose the appropriate estimation.
Here is the program:

scalar p=6
scalar q=6
table (p,q) cmpaic
setcell(cmpaic,1,1,"tbl regroupant les aic et bic")
setline(cmpaic,2)
for !i=1 to p
for !j=1 to q

equation e1_!i_!j.ls dcac c ar(!i) ma(!j)

'setcell(cmpaic,!i+2*!j,1,"e1_"+!i+!j) ( error of syntax)
'setcell(cmpaic,!i+2,1, e1_!i_!j.aic) ( i don't know how to choose only the aic value

next

next

Re: programm to estimate a serie using aic...

Posted: Sat Jan 03, 2009 7:25 pm
by EViews Gareth
change:

Code: Select all

setcell(cmpaic,!i+2*!j,1,"e1_"+!i+!j) ( error of syntax)
to be:

Code: Select all

%name = "e1_" + @str(!i)+@str(!j) cmpaic(!i+2*!j,1) = %name
And change:

Code: Select all

setcell(cmpaic,!i+2,1, e1_!i_!j.aic)
to be:

Code: Select all

cmpaic(!i+2,1) = e1_!i_!j.@aic

Re: programm to estimate a serie using aic...

Posted: Mon Jan 05, 2009 2:53 am
by hnida
it's working perfectly. thanks a lot