Unconstrained and constrained maximum likelihood estimation of Gaussian Mixture Vector Autoregressive (GMVAR)
model, quantile residual tests, graphical diagnostics, simulations, and forecasting.
Leena Kalliovirta, Mika Meitz, Pentti Saikkonen (2016)
The goal of gmvarkit is to provide tools to work with Gaussian Mixture Vector Autoregressive (GMVAR) model. Most importantly gmvarkit provides function
fitGMVAR for two phase maximum likelihood estimation, but it also constains functions for quantile residual tests, graphical diagostics, forecasting and simulations. Also applying general linear constraints to the autoregressive parameters is supported.
This is a basic example how to estimate a GMVAR model to an example data. The estimation process is computationally heavy and uses parallel computing.
data <- cbind(10*eurusd[,1], 100*eurusd[,2])colnames(data) <- colnames(eurusd)# GMVAR(2,2) modelfit22 <- fitGMVAR(data, p=2, M=2)fit22# GMVAR(2,2) model with autoregressive parameters restricted to be the same for all regimesC_mat <- rbind(diag(2*2^2), diag(2*2^2))fit22c <- fitGMVAR(data, p=2, M=2, constraints=C_mat)fit22c