Bayesian Estimation of Multivariate Threshold Autoregressive Models

Estimation, inference and forecasting using the Bayesian approach for multivariate threshold autoregressive (TAR) models in which the distribution used to describe the noise process belongs to the class of Gaussian variance mixtures.


mtarm: Multivariate Threshold Autoregressive (TAR) models

Overview

mtarm is an R package for Bayesian estimation, inference, model comparison, and forecasting in multivariate Threshold Autoregressive (TAR) models. The package supports multiple innovation distributions, automatic variable selection through Stochastic Search Variable Selection (SSVS), and both standard forecasting and rolling-origin forecast evaluation. The package accommodates multivariate TAR models with exogenous variables and allows for flexible error specifications, including Gaussian, Student-$t$, skew-normal, skew-Student-$t$, Laplace, slash, contaminated normal, and symmetric hyperbolic distributions.

Installation

Install the development version from GitHub:

remotes::install_github("lhvanegasp/mtarm")

Load the package:

library(mtarm)

Main Features

  • Bayesian estimation of all model parameters in multivariate TAR models, except for the number of regimes.

  • Support for multiple threshold regimes and exogenous variables.

  • Automatic variable selection through Stochastic Search Variable Selection (SSVS).

  • Flexible innovation distributions, including heavy-tailed and skewed alternatives.

  • Standard forecasting and rolling-origin forecast evaluation.

  • Model comparison using the Deviance Information Criterion (DIC), Watanabe-Akaike Information Criterion (WAIC), log-score (LS), Energy Score (ES), Absolute Percentage Error (APE), and related predictive measures.

  • Residual diagnostics based on quantile-type residuals.

  • Integration with the coda package for convergence assessment and posterior analysis.

  • Parallel model estimation and specification search through mtar_grid().

Quick Start

The following example illustrates how a $\text{TAR}(3;p=(1,1,2))$ Student-$t$ model can be fitted on a bivariate output series:

library(mtarm)

data(returns)
fit <- mtar(~ COLCAP + BOVESPA | SP500, data=returns, row.names=Date,
            subset={Date<="2015-12-07"}, dist="Student-t",
            ars=ars(nregim=3,p=c(1,1,2)), n.burnin=1000, n.sim=2000,
            n.thin=2)

summary(fit)

Generate forecasts:

newdata <- subset(returns, Date>"2015-12-07")
pred <- predict(fit, newdata=newdata, n.ahead=nrow(newdata), credible=0.95)

pred[["summary"]]

Documentation

Additional examples and detailed explanations are available in the package website:

https://lhvanegasp.github.io/mtarm/

Reference manual:

https://lhvanegasp.github.io/mtarm/reference/

Articles and vignettes:

https://lhvanegasp.github.io/mtarm/articles/

Reproducibility

For reproducible analyses, users are encouraged to set a random seed before model estimation:

set.seed(6666)

All examples included in the documentation website and package vignettes can be reproduced directly from the source code distributed with the package.

Citation

If you use mtarm in academic work, please cite the corresponding package paper:

Vanegas, L. H., et al. mtarm: Bayesian Multivariate Threshold Autoregressive Models in R.

Reference manual

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

install.packages("mtarm")

0.1.9 by Luis Hernando Vanegas, 4 months ago


https://lhvanegasp.github.io/mtarm/


Report a bug at https://github.com/lhvanegasp/mtarm/issues


Browse source code at https://github.com/cran/mtarm


Authors: Luis Hernando Vanegas [aut, cre] , Sergio Alejandro Calderón [aut] , Luz Marina Rondón [aut]


Documentation:   PDF Manual  


GPL-2 | GPL-3 license


Imports methods, stats, utils, graphics, Formula, grDevices, GIGrvg, coda, mvtnorm, future.apply, progressr, future

Suggests cli, knitr, rmarkdown, testthat


See at CRAN