regimeSummary(x, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975))
gibbs.msbvar
, the MCMC sampler for the
MSBVAR models coda
package. Defaults are as given above.x$Q.sample
draws of the
transition matrixcoda
package
to summarize the MCMC output for the transition matrix of an MSBVAR
model estimated from gibbs.msbvar
. It adds labels to
the output so one know which regime is which in the output. In the
summary of the transition matrix $Q's$ elements $q(ij)$
for the transition from regime $i$ to regime $j$.The ergodic regime probabilities are computed for draw $k$ of the MSBVAR MCMC sampler as described in Kim and Nelson (1999):
eta <- solve(rbind(cbind(diag(h-1) - t(Q)[1:(h-1),1:(h-1)], t(Q)[1:(h-1),h]), rep(1,h)))
This is the gives $N2$ draws of the ergodic probabilities of being
in regime $k$. These are summarized again using coda
functions.
Finally, the ergodic regime probabilities can be used to estimate
expected long run regime durations. For $eta(k)$ the
expected regime duration is $1/(1-eta(k)$. This
again is summarized over the $N2$ draws using coda
functions.
gibbs.msbvar
, plotregimeid
, msbvar
## Not run:
# regimeSummary(x)
# ## End(Not run)
Run the code above in your browser using DataLab