Learn R Programming

MSBVAR (version 0.4.0)

gibbs.msbsvar: Gibbs-Metropolis-Hastings sampler for posterior of a Markov-switching Bayesian structural vector autoregression model

Description

Samples the parameters for the structural contemporaneous parameter matrix $A_0$, the structural parameters for the lagged VAR(p) coefficients, and the state-space for a Markov-switching Bayesian Structural Vector Autoregression (MSBSVAR) model.

Usage

gibbs.msbsvar(x, N1 = 1000, N2 = 1000,
              tune = matrix(10, x$m, x$h))

Arguments

Value

A list of the class "MSBSVAR" that contains the N2 draws from the posterior. The list has the following elements:b.samplea mcmc class object of N2 draws of bF.samplea mcmc class object of N2 draws of the coefficients for the F matrix for the AR dynamics.xi.samplea mcmc class object of N2 draws for the $m \times h$ values of $\xi$Q.samplea mcmc class object for the N2 draws of the $h \times h$ matrix Qss.samplea list of length N2 of bit class objects that store the samples of the 0-1 matrices for the h-1 data for the state-space. These objects can be accessed and summarized using the sum.SS, mean.SS and plot.SS function class.accept.ratemh vector of the acceptance rates for the Metropolis steps for each equation in each regimeA0mode$m \times m$ matrix for the initial $A_0(s_t)$ around which the draws of the posterior are normalized via Waggoner and Zha's likelihood normalizationhinteger, number of regimes in the model

Details

Samples the posterior pdf for the MSBSVAR model described in Sims et al (2008). This sampler is rather involved, so users should consult the original paper listed in the references below. This function is means to be called after msbsvar, so consult that function for further information. The function returns N2 draws of the parameters from the sampler.

Much of the computational heavy lifting (especially the state-space sampling for the $T \times h$ regime values) is done in compiled C++ code. Consult the course code for additional details.

This function is experimental, so use at your own risk.

References

Sims, C.A., D. Waggoner and T. A. Zha. 2008. "Methods for Inference in Large Multiple-Equation Markov-switching Models." Journal of Econometrics.

See Also

msbsvar, sum.SS, mean.SS, plot.SS, mcmc