gibbs.msbsvar {MSBVAR} | R Documentation |
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.
gibbs.msbsvar(x, N1 = 1000, N2 = 1000, tune = matrix(10, x$m, x$h))
x |
An object of the class MSBSVARsetup created by
msbsvar |
N1 |
Number of burn-in iterations for the sampler |
N2 |
Number of iterations in the posterior sample |
tune |
m x h matrix of tuning values for the Metropolis-Hastings steps used to estimate the b parameters of A(0, s(t)) |
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 x 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.
A list of the class "MSBSVAR" that contains the N2 draws from the posterior. The list has the following elements:
b.sample |
a mcmc class object of N2 draws of
b |
F.sample |
a mcmc class object of N2 draws of the
coefficients for the F matrix for the AR dynamics. |
xi.sample |
a mcmc class object of N2 draws for
the m x h values of xi |
Q.sample |
a mcmc class object for the N2 draws of
the h x h matrix Q |
ss.sample |
a 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.rate |
mh vector of the acceptance rates for the
Metropolis steps for each equation in each regime |
A0mode |
m x m matrix for the initial A(0, s(t)) around which the draws of the posterior are normalized via Waggoner and Zha's likelihood normalization |
h |
integer, number of regimes in the model |
The storage of this object makes extensive use of the
bit
class / package to reduce memory overhead. You will
need to use the summary function in MSBVAR to work with these objects
(or read the source code).
Patrick T. Brandt
Sims, C.A., D. Waggoner and T. A. Zha. 2008. "Methods for Inference in Large Multiple-Equation Markov-switching Models." Journal of Econometrics.
msbsvar
, sum.SS
,
mean.SS
, plot.SS
, mcmc