Storing Akaike number

For questions regarding programming in the EViews programming language.

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

marinagruc
Posts: 4
Joined: Thu Aug 28, 2014 5:48 pm

Storing Akaike number

Postby marinagruc » Mon Sep 15, 2014 10:52 am

Hello,
I need to store the Akaike number in a matrix so I can after choose the best model for each serie. I tried in 2 different ways.
The First:

'create matrix to store coefficients.
matrix(1,19) coefs

for !i=1 to 19
for %y Avic Bebidas Chapas Diversos Fumos hortifru Mademobi transportes eletcom Mecanica Metalurgica Papel aliment farmperfu plastborr Quimicos TexteisVest VidroeCer Total

equation {%y}_eq.ls {%y} c sar(1)
'store coefficients into matrix
colplace(coefs, {%y}_eq.@aic, !i)

And I need to do for all the list below too:

equation {%y}_eq.ls {%y} c sma(1)
equation {%y}_!ieq.ls {%y} c ar(1)
equation {%y}_!ieq.ls {%y} c ma(1)
equation {%y}_!ieq.ls {%y} c sar(1) sma(1)
equation {%y}_!ieq.ls {%y} c sar(1) ar(1)
equation {%y}_!ieq.ls {%y} c sar(1) ma(1)
equation {%y}_!ieq.ls {%y} c sma(1) ar(1)
equation {%y}_!ieq.ls {%y} c sma(1) ma(1)
equation {%y}_!ieq.ls {%y} c ma(1) ar(1)
equation {%y}_!ieq.ls {%y} c sar(1) sma(1) ar(1)
equation {%y}_!ieq.ls {%y} c sar(1) sma(1) ma(1)
equation {%y}_!ieq.ls {%y} c sma(1) ar(1) ma(1)
equation {%y}_!ieq.ls {%y} c ma(1) ar(1) sar(1)
equation {%y}_!ieq.ls {%y} c sar(1) sma(1) ar(1) ma(1)

next
next

Bu then appears the message: “Scalar “” sent to a function which is expecting a matrix in COLPLACE(COEFS, AVIC.EQ@AIC, 1)”

I tried in another way:

'create matrix to store coefficients.
matrix(19,19) x
vector(19) y

!i=1
y(!i) = !i
for !j=1 to 19


for %y Avic Bebidas Chapas Diversos Fumos hortifru Mademobi transportes eletcom Mecanica Metalurgica Papel aliment farmperfu plastborr Quimicos TexteisVest VidroeCer Total

equation {%y}_eq.ls {%y} c sar(1)

x(!i;!j) = {%y}_eq.@aic

next
next

But appears the message: "Sintax error in "X(1,1) = AVIC_eq.@aic"

Can you help me?
Thank you!

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

Re: Storing Akaike number

Postby EViews Gareth » Mon Sep 15, 2014 11:05 am

Code: Select all

x(!i;!j) = {%y}_eq.@aic
should be

Code: Select all

x(!i,!j) = {%y}_eq.@aic

marinagruc
Posts: 4
Joined: Thu Aug 28, 2014 5:48 pm

Re: Storing Akaike number

Postby marinagruc » Mon Sep 15, 2014 1:46 pm

Hello Garreth,
I didn't understand your answer... I already tried the : x(!i;!j) = {%y}_eq.@aic
But it keeps appearing the message: "Sintax error in "X(1,1) = AVIC_eq.@aic"

Here is the program:
'create matrix to store coefficients.

matrix(19,19) x
vector(19) y

!i=1
y(!i) = !i
for !j=1 to 19

for %y Avic Bebidas Chapas Diversos Fumos hortifru Mademobi transportes eletcom Mecanica Metalurgica Papel aliment farmperfu plastborr Quimicos TexteisVest VidroeCer Total

equation {%y}_eq.ls {%y} c sar(1)

x(!i;!j) = {%y}_eq.@aic

next
next

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

Re: Storing Akaike number

Postby EViews Gareth » Mon Sep 15, 2014 3:32 pm

You have a semicolon where you need a comma.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests