Page 1 of 1

Error Message in ARCH\GARCH

Posted: Tue Jan 08, 2013 12:18 pm
by vikitsich
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

Re: Error Message in ARCH\GARCH

Posted: Tue Jan 08, 2013 12:23 pm
by EViews Gareth
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

Re: Error Message in ARCH\GARCH

Posted: Tue Jan 08, 2013 12:29 pm
by vikitsich
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

Re: Error Message in ARCH\GARCH

Posted: Tue Jan 08, 2013 1:19 pm
by EViews Gareth
Sorry, my fault. Use parenthesis () rather than brackets []

Re: Error Message in ARCH\GARCH

Posted: Tue Jan 08, 2013 1:36 pm
by vikitsich
Done! Thank you very much!