Sampling variances in MSVAR

Discussion of models with structural breaks or endogenous switching.

Sampling variances in MSVAR

Postby chauhal » Wed Apr 03, 2013 1:46 pm

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 6 times
chauhal
 
Posts: 10
Joined: Sun Mar 03, 2013 8:30 am

Re: Sampling variances in MSVAR

Postby TomDoan » Wed Apr 03, 2013 3:49 pm

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.
TomDoan
 
Posts: 2718
Joined: Wed Nov 01, 2006 5:36 pm


Return to Structural Breaks and Switching Models

Who is online

Users browsing this forum: No registered users and 1 guest