Page 1 of 1

Error: ## MAT15. Subscripts Too Large or Non-Positive

Posted: Fri May 30, 2008 3:39 am
by bkoksal
What is the cause of the following error message and how can I correct this problem?

## MAT15. Subscripts Too Large or Non-Positive

I used the following code. Garch works without problems but the lines following garch do not.
garch(p=1,q=1,mv=bek,hmatrices=hh,method=bfgs,iters=200,pmethod=simplex,piters=20) / IndexA IndexB IndexC

set rho12 = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2))
set rho13 = hh(t)(1,3)/sqrt(hh(t)(1,1)*hh(t)(3,3))
set rho23 = hh(t)(2,3)/sqrt(hh(t)(2,2)*hh(t)(3,3))

Posted: Fri May 30, 2008 9:39 am
by TomDoan
The matrix hh(t) is only defined over the estimation range for the GARCH instruction. I'm guessing that you may have a missing value or two at the start of your input series for GARCH. The SET instruction will therefore have a problem evaluating hh(t)(1,1) unless it's given an explicit range.

If you make your SET instructions read:

Code: Select all

set rho12 %regstart() %regend() = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2)) 
set rho13 %regstart() %regend() = hh(t)(1,3)/sqrt(hh(t)(1,1)*hh(t)(3,3)) 
set rho23 %regstart() %regend() = hh(t)(2,3)/sqrt(hh(t)(2,2)*hh(t)(3,3))
it will restrict the calculation to the range over which it is defined.