BHLK.filter {MSBVAR} | R Documentation |
Implements a Baum-Hamilton-Lindgren-Kim state-space filter for a multivariate Markov-switching model.
BHLK.filter(u, Sigma, Q)
u |
T x m x h dimensional array of the regime-specific residuals to be filtered for the MS process. |
Sigma |
m x m x h dimensional array of the regime-specific error covariances. |
Q |
The h x h Markov transition matrix. |
Estimates the Markov-switching regime probabilities for an MSBVAR model. Conditional on the BVAR(p) model, the residuals are used to filter the data. The estimation is done using compiled C++ code for speed.
x |
T x h matrix of the filtered regime probabilities. |
Patrick T. Brandt
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.
Kim, C.J. and C.R. Nelson. 1999. State-space models with regime switching. Cambridge, Mass: MIT Press.
Krolzig, Hans-Martin. 1997. Markov-Switching Vector Autoregressions: Modeling, Statistical Inference, and Application to Business Cycle Analysis.
# Sets up and estimates a set of filter probabilities h <- 2 m <- 2 TT <- 100 u <- array(rnorm(TT*m*h), c(TT, m, h)) Sigma <- array(diag(m), c(m, m, h)) Q <- matrix(c(0.99, 0.2, 0.01, 0.8), h, h) x <- BHLK.filter(u, Sigma, Q)