Learn R Programming

MSBVAR (version 0.4.0)

msbsvar: Markov-Switching Sims-Zha Bayesian VAR Model estimation

Description

Estimates the posterior model for a Markov-Switching Bayesian Structural Vector Autoregression (B-SVAR) model using the prior specified by Sims and Zha (1998)

Usage

msbsvar(Y, z = NULL, p, h, ident,
        lambda0, lambda1, lambda3, lambda4, lambda5, mu5, mu6,
        qm, alpha.prior, max.iter = 10)

Arguments

Value

A list of the class "MSBSVAR" that summarizes the posterior mode of the MSBSVAR modelbReduced rank vector of parameters that describe the elements of $A_0$.xi$m \times h$ matrix of the regime dependent variance weights.Q$h \times h$ matrix estimate of the Markov transition matrixfp$T \times h$ matrix of the filter probabilities for the h regimes.m$m$ number of endogenous variables in the systemp$p$ number of lags used in the VARh$h$ number of regimesinit.modelan object of the class "BSVAR" that contains the information for the model setup, prior, etc. (needed for later calculations)n0number of free parameters in each column of the $A_0(s_t)$ matrices.n0cuma cumulative sum of n0abar$m \times h$ matrix of the alpha parameters for the gamma prior for regime dependent variance weights.bbar$m \times h$ matrix of the beta parameters for the gamma prior for regime dependent variance weights.alpha.prior$h \times h$ matrix of values for the Dirichlet prior for the Markov transition matrix

Details

This function estimates the posterior mode for a version of the Markov-switching Bayesian structural VAR (MSBSVAR) model described by Sims, Waggoner, and Zha (2008). This MSBSVAR model is based on a specification of the dynamic simultaneous equation representation of the model. The prior is constructed for the structural parameters and an unrestricted Markov process (contra the main results in Sims et al. (2008).

The basic MSBSVAR model has the form of Waggoner and Zha (2003) and Sims et al (2008): $$y_t^\prime A_0(s_t) = \sum_{\ell=1}^p Y_{t-\ell}^\prime A_\ell(s_t) + z_t^\prime D(s_t) + \epsilon_t(s_t)^\prime, t = 1, \ldots, T,$$

where $A_i(s_t)$ are $m \times m$ parameter matrices for the contemporaneous and lagged effects of the endogenous variables in regime $s_t$, $D(s_t)$ is an $h \times m$ parameter matrix for the exogenous variables (including an intercept) in regime $s_t$, $y_t$ is the $m \times 1$ matrix of the endogenous variables, $z_t$ is a $h \times 1$ vector of exogenous variables (including an intercept) and $\epsilon_t(s_t)$ is the $m \times 1$ matrix of structural shocks in regime $s_t$. NOTE that in this representation of the model, the columns of the $A_\ell(s_t)$ matrices refer to the equations! The structural shocks are normal with mean and variance equal to the following: $$E[\epsilon_t | y_1, \ldots, y_{t-1}, z_1, \ldots z_{t-1}] = 0$$ $$E[\epsilon_t \epsilon_t^\prime | y_1, \ldots, y_{t-1}, z_1, \ldots z_{t-1}] = I$$ At present, the model does NOT include switching structural variances (contra the Sims et al. (2008) paper). This is because this depends on the normalization of the variances across the regimes and we are working on a more general specification of this for users.

Restrictions on the contemporaneous parameters in $A_0$ are expressed by the specification of the ident matrix that defines the shocks that "hit" each equation in the contemporaneous specification. If ident is defined as in the following table,

lccc{ Equations Variables Eqn 1 Eqn 2 Eqn 3 Var. 1 1 0 0 Var. 2 1 1 0 Var. 3 0 1 1 }

then the corresponding $A_0$ is restricted to lccc{ Equations Variables Eqn 1 Eqn 2 Eqn 3 Var. 1 $a_{11}$ 0 0 Var. 2 $a_{12}$ $a_{22}$ 0 Var. 3 0 $a_{23}$ $a_{33}$ }

which is interpreted as shocks in variables 1 and 2 hit equation 1 (the first column); shocks in variables 2 and 3 hit the second equation (column 2); and, shocks in variable 3 hit the third equation (column 3).

Note that the identification is the same across the regimes. (I hope to allow different structures across regimes in future versions). The prior needs to be described here -- borrow from the earlier MPSA paper!

References

Sims, C.A., D. Waggoner and T. A. Zha. 2008. "Methods for Inference in Large Multiple-Equation Markov-switching Models." Journal of Econometrics. Sims, C.A. and Tao A. Zha. 1998. "Bayesian Methods for Dynamic Multivariate Models." International Economic Review. 39(4):949-968.

Waggoner, Daniel F. and Tao A. Zha. 2003a. "A Gibbs sampler for structural vector autoregressions" Journal of Economic Dynamics & Control. 28:349--366.

Waggoner, Daniel F. and Tao A. Zha. 2003b. "Likelihood preserving normalization in multiple equation models". Journal of Econometrics. 114: 329--347.

See Also

gibbs.msbsvar for sampling from the model's posterior, szbsvar for a non-Markov-switching version of this model, szbvar for reduced form Bayesian VAR models, reduced.form.var for non-Bayesian reduced form VAR models