Learn R Programming

bayesforecast (version 1.0.5)

Holt: A constructor for a Holt trend state-space model.

Description

Constructor of the ets("A","A","Z") object for Bayesian estimation in Stan.

Usage

Holt(ts, damped = FALSE, xreg = NULL, genT = FALSE, series.name = NULL)

Value

The function returns a list with the data for running stan() f unction of rstan package.

Arguments

ts

a numeric or ts object with the univariate time series.

damped

a boolean value to specify a damped trend local level model. By default, damped = FALSE. If trend option is FALSE then damped = FALSE automatically.

xreg

Optionally, a numerical matrix of external regressors, which must have the same number of rows as ts. It should not be a data frame.

genT

a boolean value to specify for a generalized t-student SSM model.

series.name

an optional string vector with the time series names.

Author

Asael Alonzo Matamoros.

Details

The genT = TRUE option generates a t-student innovations SSM model. For more references check Ardia (2010); or Fonseca, et. al (2019).

The default priors used in a ssm( ) model are:

  • level ~ normal(0,0.5)

  • trend ~ normal(0,0.5)

  • damped~ normal(0,0.5)

  • sigma0 ~ t-student(0,1,7)

  • level1 ~ normal(0,1)

  • trend1 ~ normal(0,1)

  • dfv ~ gamma(2,0.1)

  • breg ~ t-student(0,2.5,6)

For changing the default prior use the function set_prior().

References

Fonseca, T. and Cequeira, V. and Migon, H. and Torres, C. (2019). The effects of degrees of freedom estimation in the Asymmetric GARCH model with Student-t Innovations. arXiv doi: arXiv: 1910.01398.

See Also

Sarima, auto.arima, set_prior, and garch.

Examples

Run this code
mod1 = Holt(ipc)

# Declaring a Holt damped trend model for the ipc data.
mod2 = Holt(ipc,damped = TRUE)

Run the code above in your browser using DataLab