## programm to estimate a serie using aic...

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

hnida
Posts: 9
Joined: Fri Jan 02, 2009 7:09 am

### programm to estimate a serie using aic...

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12460
Joined: Tue Sep 16, 2008 5:38 pm

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

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`

hnida
Posts: 9
Joined: Fri Jan 02, 2009 7:09 am

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

it's working perfectly. thanks a lot