mvgam_trends {mvgam}R Documentation

Supported mvgam trend models

Description

Supported mvgam trend models

Details

mvgam currently supports the following dynamic trend models:

For most dynamic trend types available in mvgam (see argument trend_model), time should be measured in discrete, regularly spaced intervals (i.e. c(1, 2, 3, ...)). However you can use irregularly spaced intervals if using trend_model = CAR(1), though note that any temporal intervals that are exactly 0 will be adjusted to a very small number (1e-12) to prevent sampling errors. For all trend types apart from GP(), PW(), and CAR(), moving average and/or correlated process error terms can also be estimated (for example, RW(cor = TRUE) will set up a multivariate Random Walk if data contains ⁠>1⁠ series). Character strings can also be supplied instead of the various trend functions. The full list of possible models that are currently supported is:

Note that only RW, AR1, AR2 and AR3 are available if using JAGS. All trend models are supported if using Stan. Dynamic factor models can be used in which the latent factors evolve as either RW, AR1-3, VAR or GP. For VAR models (i.e. VAR and VARcor models), users can either fix the trend error covariances to be 0 (using VAR) or estimate them and potentially allow for contemporaneously correlated errors using VARcor. For all VAR models, stationarity of the latent process is enforced through the prior using the parameterisation given by Heaps (2022). Stationarity is not enforced when using AR1, AR2 or AR3 models, though this can be changed by the user by specifying lower and upper bounds on autoregressive parameters using functionality in get_mvgam_priors and the priors argument in mvgam. Piecewise trends follow the formulation in the popular prophet package produced by Facebook, where users can allow for changepoints to control the potential flexibility of the trend. See Taylor and Letham (2018) for details

References

Sarah E. Heaps (2022) Enforcing stationarity through the prior in Vector Autoregressions. Journal of Computational and Graphical Statistics. 32:1, 1-10.

Sean J. Taylor and Benjamin Letham (2018) Forecasting at scale. The American Statistician 72.1, 37-45.

See Also

RW, AR, CAR, VAR, PW, GP


[Package mvgam version 1.1.2 Index]