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

Discussions of ARCH, GARCH, and related models
Post Reply
bkoksal
Posts: 5
Joined: Mon May 12, 2008 6:32 am

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

Post 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))
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Post 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.
Post Reply