Estimate Gaussian and Student's t Mixture Vector Autoregressive Models

Unconstrained and constrained maximum likelihood estimation of structural and reduced form Gaussian mixture vector autoregressive, Student's t mixture vector autoregressive, and Gaussian and Student's t mixture vector autoregressive models, quantile residual tests, graphical diagnostics, simulations, forecasting, and estimation of generalized impulse response function and generalized forecast error variance decomposition. Leena Kalliovirta, Mika Meitz, Pentti Saikkonen (2016) , Savi Virolainen (2021) , Savi Virolainen (2021) .

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.

Simple example

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) model
fit22 <- fitGMVAR(data, p=2, M=2)
# GMVAR(2,2) model with autoregressive parameters restricted to be the same for all regimes
C_mat <- rbind(diag(2*2^2), diag(2*2^2))
fit22c <- fitGMVAR(data, p=2, M=2, constraints=C_mat)


  • Kalliovirta L., Meitz M. and Saikkonen P. (2016) Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.
  • Kalliovirta L. and Saikkonen P. (2010) Reliable Residuals for Multivariate Nonlinear Time Series Models. Unpublished Revision of HECER Discussion Paper No. 247.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.2 by Savi Virolainen, 3 days ago

Report a bug at

Browse source code at

Authors: Savi Virolainen [aut, cre]

Documentation:   PDF Manual  

Task views: Time Series Analysis

GPL-3 license

Imports Brobdingnag, mvnfast, parallel, stats, pbapply, graphics, grDevices, gsl

Suggests testthat, knitr, rmarkdown

See at CRAN