msbvar {MSBVAR}R Documentation

Markov-switching Bayesian reduced form vector autoregression model setup and posterior mode estimation

Description

Sets up and estimates the posterior mode of a reduced form Markov-switching Bayesian vector autoregression model with a Sims-Zha prior. This is the setup and input function for the Gibbs sampler for this model.

Usage

msbvar(y, z = NULL, p, h, lambda0, lambda1, lambda3, lambda4,
       lambda5, mu5, mu6, qm,
       alpha.prior = 100 * diag(h) + matrix(2, h, h),
       prior=0, max.iter = 40)

Arguments

y T x m multiple time series object created with ts().
z NOT IMPLEMENTED AT PRESENT: THIS SHOULD BE A T x k matrix of exogenous variables. Can be z = NULL if there are none (the default).
p Lag length, an integer
h Number of regimes / states, an integer
lambda0 [0,1], Overall tightness of the prior (discounting of prior scale).
lambda1 Lag decay (>0, with 1=harmonic)
lambda3 Lag decay (>0, with 1=harmonic)
lambda4 Standard deviation or tightness around the intercept >0
lambda5 Standard deviation or tightness around the exogneous variable coefficients >0
mu5 Sum of coefficients prior weight >=0. Larger values imply difference stationarity.
mu6 Dummy initial observations or drift prior >=0. Larger values allow for common trends.
qm Frequency of the data for lag decay equivalence. Default is 4, and a value of 12 will match the lag decay of monthly to quarterly data. Other values have the same effect as "4"
alpha.prior Prior for the Dirichlet process for the MS process. Default is 100 * diag(h) + matrix(2, h, h), but the model will be sensitive to this.
prior One of three values: 0 = Normal-Wishart prior, 1 = Normal-flat prior, 2 = flat-flat prior (i.e., akin to MLE). The conjugate prior is the first one, which is the default.
max.iter Maximum number of iterations for the block EM algorithm used to fit an initial guess of the model posterior. Default value is 40 iterations. Larger problems will need more iterations.

Details

This function estimates the posterior mode of a reduced form Bayesian Markov-switching VAR model. The MSBVAR mode is estimated using block EM algorithm where the blocks are 1) the MS state-space, 2) the BVAR regression step for each regime and 3) the transition matrix. Starting values are randomly drawn, so a random number seed should be set prior to calling the function in order to make the results replicable.

This function should NOT be used for inference, since it only finds the posterior mode of the model. This function is intended to generate starting values for the Gibbs sampling of the model. See gibbs.msbvar for further details of the Gibbs sampling.

Value

A list describing the posterior mode of the MSBVAR model and the inputs necessary for the subsequent Gibbs sampler.

init.model An object of the class BVAR that describes the setup of the model. See szbvar for details.
hreg A list containing the regime-specific moment matrices, VAR coefficients, and error covariances
Q The h x h Markov transition matrix.
fp The T x h matrix of the filtered regime probabilities. First column is the first regime, etc.
m Integer, the number of endogenous variables in the system.
p Integer, the lag length of the VAR.
h Integer, the number of regimes in the MS process.
alpha.prior The h x h matrix for the prior for the Dirichlet density for the MS process.

Note

Users should consult the reference papers and the (coming) package vignette to see how this function is used to setup an MSBVAR model.

Author(s)

Patrick T. Brandt

References

Brandt, Patrick T. 2009. "Empirical, Regime-Specific Models of International, Inter-group Conflict, and Politics"

Fruhwirth-Schnatter, Sylvia. 2001. "Markov Chain Monte Carlo Estimation of Classical and Dynamic Switching and Mixture Models". Journal of the American Statistical Association. 96(153):194–209.

Fruhwirth-Schnatter, Sylvia. 2006. Finite Mixture and Markov Switching Models. Springer Series in Statistics New York: Springer.

Sims, Christopher A. and Daniel F. Waggoner and Tao Zha. 2008. "Methods for inference in large multiple-equation Markov-switching models" Journal of Econometrics 146(2):255–274.

Sims, Christopher A. and Tao A. Zha. 1998. "Bayesian Methods for Dynamic Multivariate Models" International Economic Review 39(4):949-968.

Sims, Christopher A. and Tao A. Zha. 2006. "Were There Regime Switches in U.S. Monetary Policy?" American Economic Review. 96(1):54–81.

See Also

gibbs.msbvar, szbvar


[Package MSBVAR version 0.4.0 Index]