estimate_bsvar_msh {bsvars} R Documentation

## Bayesian estimation of a Structural Vector Autoregression with Markov-switching heteroskedasticity via Gibbs sampler

### Description

Estimates the SVAR with Markov-switching heteroskedasticity with M regimes (MS(M)) proposed by Woźniak & Droumaguet (2022). Implements the Gibbs sampler proposed by Waggoner & Zha (2003) for the structural matrix B and the equation-by-equation sampler by Chan, Koop, & Yu (2021) for the autoregressive slope parameters A. Additionally, the parameter matrices A and B follow a Minnesota prior and generalised-normal prior distributions respectively with the matrix-specific overall shrinkage parameters estimated thanks to a 3-level hierarchical prior distribution. The MS model is estimated using the prior distributions and algorithms proposed by Woźniak & Droumaguet (2022). See section Details for the model equations.

### Usage

estimate_bsvar_msh(S, specification, thin = 10, show_progress = TRUE)


 S a positive integer, the number of posterior draws to be generated specification an object of class BSVAR-MSH generated using the specify_bsvar_msh$new() function. thin a positive integer, specifying the frequency of MCMC output thinning show_progress a logical value, if TRUE the estimation progress bar is visible ### Details The heteroskedastic SVAR model is given by the reduced form equation: Y = AX + E where Y is an NxT matrix of dependent variables, X is a KxT matrix of explanatory variables, E is an NxT matrix of reduced form error terms, and A is an NxK matrix of autoregressive slope coefficients and parameters on deterministic terms in X. The structural equation is given by BE = U where U is an NxT matrix of structural form error terms, and B is an NxN matrix of contemporaneous relationships. Finally, the structural shocks, U, are temporally and contemporaneously independent and jointly normally distributed with zero mean. The conditional variance of the nth shock at time t is given by: Var_{t-1}[u_{n.t}] = s^2_{n.s_t} where s_t is a Markov process driving the time-variability of the regime-specific conditional variances of structural shocks s^2_{n.s_t}. In this model, the variances of each of the structural shocks sum to M. The Markov process s_t is either: • stationary, irreducible, and aperiodic which requires all regimes to have a positive number occurrences over the sample period, or • sparse with potentially many regimes with zero occurrences over the sample period and in which the number of regimes is estimated. These model selection also with this respect is made using function specify_bsvar_msh. ### Value An object of class PosteriorBSVAR-MSH containing the Bayesian estimation output and containing two elements: posterior a list with a collection of S draws from the posterior distribution generated via Gibbs sampler containing: A an NxKxS array with the posterior draws for matrix A B an NxNxS array with the posterior draws for matrix B hyper a 5xS matrix with the posterior draws for the hyper-parameters of the hierarchical prior distribution sigma2 an NxMxS array with the posterior draws for the structural shocks conditional variances PR_TR an MxMxS array with the posterior draws for the transition matrix. xi an MxTxS array with the posterior draws for the regime allocation matrix. pi_0 an MxS matrix with the posterior draws for the initial state probabilities last_draw an object of class BSVAR-MSH with the last draw of the current MCMC run as the starting value to be passed to the continuation of the MCMC estimation using bsvar_msh(). ### Author(s) Tomasz Woźniak wozniak.tom@pm.me ### References The model, prior distributions, and estimation algorithms were proposed by Woźniak, T., and Droumaguet, M., (2022) Bayesian Assessment of Identifying Restrictions for Heteroskedastic Structural VARs Some more analysis on heteroskedastic SVAR models was proposed by: Lütkepohl, H., and Woźniak, T., (2020) Bayesian Inference for Structural Vector Autoregressions Identified by Markov-Switching Heteroskedasticity. Journal of Economic Dynamics and Control 113, 103862, doi:10.1016/j.jedc.2020.103862. Sampling from the generalised-normal full conditional posterior distribution of matrix B is implemented using the Gibbs sampler by: Waggoner, D.F., and Zha, T., (2003) A Gibbs sampler for structural vector autoregressions. Journal of Economic Dynamics and Control, 28, 349–366, doi:10.1016/S0165-1889(02)00168-9. Sampling from the multivariate normal full conditional posterior distribution of each of the A matrix row is implemented using the sampler by: Chan, J.C.C., Koop, G, and Yu, X. (2021) Large Order-Invariant Bayesian VARs with Stochastic Volatility. The estimation of the Markov-switching heteroskedasticity closely follows procedures described by: Song, Y., and Woźniak, T., (2021) Markov Switching. Oxford Research Encyclopedia of Economics and Finance, Oxford University Press, doi:10.1093/acrefore/9780190625979.013.174. and Frühwirth-Schnatter, S., (2006) Finite Mixture and Markov Switching Models. Springer Series in Statistics. New York: Springer, doi:10.1007/978-0-387-35768-3. The sparse model is inspired by: Malsiner-Walli, G., Frühwirth-Schnatter, S., and Grün, B. (2016) Model-based clustering based on sparse finite Gaussian mixtures. Statistics and Computing, 26(1–2), 303–324, doi:10.1007/s11222-014-9500-2. The forward-filtering backward-sampling is implemented following the proposal by: Chib, S. (1996) Calculating posterior distributions and modal estimates in Markov mixture models. Journal of Econometrics, 75(1), 79–97, doi:10.1016/0304-4076(95)01770-4. ### See Also specify_bsvar_msh, specify_posterior_bsvar_msh, normalise_posterior ### Examples # upload data data(us_fiscal_lsuw) # specify the model and set seed specification = specify_bsvar_msh$new(us_fiscal_lsuw, p = 4, M = 2)
set.seed(123)

# run the burn-in
burn_in        = estimate_bsvar_msh(50, specification)

# estimate the model
posterior      = estimate_bsvar_msh(100, burn_in\$get_last_draw())



[Package bsvars version 1.0.0 Index]