Modeling regimes with extremes: the bayesdfa package for identifying and forecasting common trends and anomalies in multivariate time-series data

The bayesdfa package provides a flexible Bayesian modeling framework for applying dy namic factor analysis (DFA) to multivariate time-series data as a dimension reduction tool. The core estimation is done with the Stan probabilistic programming language. In addition to being one of the few Bayesian implementations of DFA, novel features of this model include (1) optionally modeling latent process deviations as drawn from a Student-t distribution to better model extremes, and (2) optionally including autoregressive and moving-average components in the latent trends. Besides estimation, we provide a series of plotting functions to visualize trends, loadings, and model pre dicted values. A secondary analysis for some applications is to identify regimes in latent trends. We provide a flexible Bayesian implementation of a Hidden Markov Model — also written with Stan — to characterize regime shifts in latent processes. We provide simulation testing and details on parameter sensitivities in supplementary information.

Eric J. Ward , Sean C. Anderson , Luis A. Damiano , Mary E. Hunsicker , Michael A. Litzow
2019-07-30

CRAN packages used

dlm, KFAS, MARSS, tsfa, rstan, heavy, bsts, stochvol, loo, depmixS4, HMM, msm

CRAN Task Views implied by cited packages

TimeSeries, Bayesian, Finance, Cluster, Distributions, Econometrics, Multivariate, Survival

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Ward, et al., "Modeling regimes with extremes: the bayesdfa package for identifying and forecasting common trends and anomalies in multivariate time-series data", The R Journal, 2019

BibTeX citation

@article{RJ-2019-007,
  author = {Ward, Eric J. and Anderson, Sean C. and Damiano, Luis A. and Hunsicker, Mary E. and Litzow, Michael A.},
  title = {Modeling regimes with extremes: the bayesdfa package for identifying and forecasting common trends and anomalies in multivariate time-series data},
  journal = {The R Journal},
  year = {2019},
  note = {https://doi.org/10.32614/RJ-2019-007},
  doi = {10.32614/RJ-2019-007},
  volume = {11},
  issue = {2},
  issn = {2073-4859},
  pages = {46-55}
}