LocalLevel: A constructor for local level state-space model.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ets.R

Description

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

Usage

1
LocalLevel(ts,xreg = NULL,genT = FALSE,series.name = NULL)

Arguments

ts

a numeric or ts object with the univariate time series.

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.

Details

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

By default the ssm() function generates a local level model (or a ets("A","N","N") or exponential smoothing model from the forecast package). If trend is set TRUE, then a local trend ssm model is defined (a equivalent ets("A","A","N") or Holt model from the forecast package). For damped trend models set damped to TRUE. If seasonal is set to TRUE a seasonal local level model is defined (a equivalent ets("A","N","A") model from the forecast package). For a Holt-Winters method (ets("A","A","A")) set Trend and seasonal to TRUE.

When genT option is TRUE a t-student innovations ssm model (see Ardia (2010)) is generated see Fonseca, et. al (2019) for more details.

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

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

Value

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

Author(s)

Asael Alonzo Matamoros.

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 garch

Examples

1
mod1 = LocalLevel(ipc)

bayesforecast documentation built on June 17, 2021, 5:14 p.m.