Sampling variances in MSVAR

Discussion of models with structural breaks or endogenous switching.
chauhal

Sampling variances in MSVAR

Unread post by chauhal »

Dear Tom,

I run MSVAR and try to do sampling variances (covariance matrix). However, I got the following problem and sincerely reply on your advice

MAT15. Subscripts Too Large or Non-Positive
The Error Occurred At Location 65, Line 11 of MSVARRESIDS

The codes and data are as follows:

SOURCE MSVARSETUP.SRC
open data PI.xls
cal(W) 2003 1 8
data(for=xls,org=columns) 2003:1:8 2011:12:28 TL ID PH ML KR SG HK US EU
compute gstart=2004:1:7, gend=2011:12:28
@msvarsetup(lags=1,states=2,switch=mh)
# TL ID PH ML KR SG HK US EU

@msvarinitial gstart gend
nonlin(parmset=varparms) mu phi sigmav
nonlin(parmset=msparms) p
frml msvarf = log(%MSVARProb(t))
maximize(parmset=varparms+msparms,start= (pstar=%MSVARInit()),reject = %msvarinittransition()==0.0,pmethod=simplex, piters=5, method=bfgs,iters=600) msvarf gstart gend

@msvarresids(regime=msregime) msvaru gstart gend

Thank you so much!
Attachments
PI.xls
(137.5 KiB) Downloaded 761 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Sampling variances in MSVAR

Unread post by TomDoan »

I'm not sure what you're trying to do. @MSVARResids is designed to be used as a step in Gibbs sampling. It evaluates the residuals at a precise set of (sampled) regimes. When you estimate the model using MAXIMIZE, you don't generate those.
Post Reply