## MAT15. Subscripts Too Large or Non-Positive
Posted: Wed Mar 01, 2017 4:34 pm
Dear Tom,
Could you please kindly help me understand what is the reason for the following error message: ## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 1753
These are my codes
The estimates seem to be consistent with my expectation
MAXIMIZE - Estimation by BHHH
Convergence in 12 Iterations. Final criterion was 0.0000092 <= 0.0000100
Monthly Data From 1871:02 To 2016:12
Usable Observations 1751
Function Value -4694.5911
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. BETAS(1)(1) 0.77042734 0.07824661 9.84614 0.00000000
2. BETAS(2)(1) -2.15178486 0.57078399 -3.76988 0.00016333
3. SIGSQV(1) 8.23814900 0.36418361 22.62087 0.00000000
4. SIGSQV(2) 59.28603151 3.30382038 17.94469 0.00000000
5. P(1,1) 0.97394910 0.00654033 148.91426 0.00000000
6. P(1,2) 0.15828346 0.03164809 5.00136 0.00000057
I am not sure where the mistake might be for the error message. Thank you in advance
Could you please kindly help me understand what is the reason for the following error message: ## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 1753
These are my codes
Code: Select all
DATA(FORMAT=XLSX,ORG=COLUMNS,SHEET="Sheet7") 1871:01 2017:02 Index
set ret = log(index/index{1})*100
print / ret
@nbercycles(down=recession)
graph(shade=recession)
# ret
@MSRegression(switch=ch,states=2) ret
# constant
*
compute gstart=1871:2,gend=2016:12
@MSRegInitial gstart gend
@MSRegEMGeneralSetup
do emits=1,50
@MSRegEMStep gstart gend
disp "Iteration" emits "Log likelihood" %logl
end do emits
*
* Polish estimates with 10 iterations of BHHH
*
compute p=%xsubmat(p,1,nstates-1,1,nstates)
nonlin(parmset=regparms) betas sigsqv
nonlin(parmset=msparms) p
frml logl = f=%MSRegFVec(t),fpt=%MSProb(t,f),log(fpt)
@MSFilterInit
maximize(start=%(%MSRegInitVariances(),pstar=%msinit()),$
parmset=regparms+msparms,$
method=bhhh,iters=100) logl gstart gend
*
* Smoothed probabilities of the regimes. (The EM procedures compute
* PSMOOTH as a side effect).
*
set p1smooth = psmooth(t)(1)
graph(footer="Smoothed Probability of Regime 1",max=1.0,min=0.0)
# p1smooth
print / p1smooth
MAXIMIZE - Estimation by BHHH
Convergence in 12 Iterations. Final criterion was 0.0000092 <= 0.0000100
Monthly Data From 1871:02 To 2016:12
Usable Observations 1751
Function Value -4694.5911
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. BETAS(1)(1) 0.77042734 0.07824661 9.84614 0.00000000
2. BETAS(2)(1) -2.15178486 0.57078399 -3.76988 0.00016333
3. SIGSQV(1) 8.23814900 0.36418361 22.62087 0.00000000
4. SIGSQV(2) 59.28603151 3.30382038 17.94469 0.00000000
5. P(1,1) 0.97394910 0.00654033 148.91426 0.00000000
6. P(1,2) 0.15828346 0.03164809 5.00136 0.00000057
I am not sure where the mistake might be for the error message. Thank you in advance