Error Message in ARCH\GARCH

For questions regarding programming in the EViews programming language.

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

vikitsich
Posts: 3
Joined: Tue Jan 08, 2013 12:10 pm

Error Message in ARCH\GARCH

Postby vikitsich » Tue Jan 08, 2013 12:18 pm

Hello,

I'm trying to make a program, which will run an ARCH\GARCH regression, for all the possible ARCH\GARCH Orders. I made the this program and now I'm trying to add a matrix in order to have the R^2,the AIC and the BIC but I get this message: scalar "" sent to a function which is expecting a matrix.

I' ve tried a lot of different things but nothing works. This is my program so far:

matrix(9,9) r2s
matrix(9,9) scw
matrix(9,9) aka

equation eq


for !i=1 to 9
for !j=1 to 9
equation eq{!i}_{!j}.arch({!i},{!j}) r_ing c r_ing(-7) 'estimates the equation
matplace(r2s, eq{!i}_{!j}.@r2, !i, !j) 'stores the r-squared
matplace(scw, eq{!i}_{!j}.@schwarz, !i, !j) 'stores the schwarz criterion
matplace(aka, eq{!i}_{!j}.@aic, !i, !j) 'stores the akaike criterion
next
next

I would like to inform you that I'm pretty new to eviews programming, but I read the "An introduction to EViews programming" article.

Thank you

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

Re: Error Message in ARCH\GARCH

Postby EViews Gareth » Tue Jan 08, 2013 12:23 pm

If you're assigning a scalar to an element in a matrix, don't use the matplace function. Rather just assign it directly:

Code: Select all

r2s[!i,!j] = eq{!i}_{!j}.@r2

vikitsich
Posts: 3
Joined: Tue Jan 08, 2013 12:10 pm

Re: Error Message in ARCH\GARCH

Postby vikitsich » Tue Jan 08, 2013 12:29 pm

I' ve tried the r2s[!i,!j] = eq{!i}_{!j}.@r2 but it doesn' t work.
The error I get this time is: R2S[!i,!j] is not defined or is an illegal command in R2S[!i,!j]= EQ1_1@r2


Thank you

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

Re: Error Message in ARCH\GARCH

Postby EViews Gareth » Tue Jan 08, 2013 1:19 pm

Sorry, my fault. Use parenthesis () rather than brackets []

vikitsich
Posts: 3
Joined: Tue Jan 08, 2013 12:10 pm

Re: Error Message in ARCH\GARCH

Postby vikitsich » Tue Jan 08, 2013 1:36 pm

Done! Thank you very much!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests