ets_modelspec: Model Specification

View source: R/specification.R

ets_modelspecR Documentation

Model Specification

Description

Specifies an ETS model prior to estimation.

Usage

ets_modelspec(
  y,
  model = "AAN",
  damped = FALSE,
  power = FALSE,
  xreg = NULL,
  frequency = NULL,
  transformation = "box-cox",
  lambda = NULL,
  normalized_seasonality = TRUE,
  fixed_pars = NULL,
  scale = FALSE,
  seasonal_init = "fixed",
  lower = 0,
  upper = 1,
  sampling = NULL,
  xreg_init = TRUE,
  ...
)

Arguments

y

an xts vector.

model

the type of model (based on the taxonomy in Hyndman) where the first letter denotes the type of error (E), the second letter the type of trend (T) and the third letter the type of seasonality (S). A value of N denotes none. Models supported are “AAA”, “AAN”, “ANN”, “ANA”, “MMM”, “MMN”, “MNN”, “MNM”, “MAM” and “MAN”. In addition, one may set model equal to “Theta”, which is equivalent to a “AAN” model with slope parameter (beta) fixed to zero.

damped

whether to include a damped trend.

power

whether to use the power model (only for multiplicative error with additive trend combination), i.e. the “MAM” and “MAN” models.

xreg

an optional xts matrix of regressors (pre-lagged).

frequency

the frequency of y (if using a seasonal model).

transformation

a valid transformation for y from the “tstransform” function in the “tsaux” package (currently box-cox or logit are available) applied to additive models only.

lambda

the Box Cox power parameter (lambda). If NA will estimate this using the method of Guerrero.

normalized_seasonality

whether to impose Roberts-McKenzie normalized seasonality.

fixed_pars

a named vector of valid parameter names with values which will be fixed rather than estimated. Valid values are as follows:

  • alpha the adjustment coefficient on the Level component

  • beta the adjustment coefficient on the Slope component

  • gamma the adjustment coefficient on the Seasonal component\

  • phi the damping parameter

  • theta the power exponent for the Level and Slope components in the power model

  • delta the power exponent for the Seasonal component in the power model

  • l0 the initial state value for the Level component

  • b0 the initial state value for the Slope component

  • s0,..., s[m-1] e.g. s11, the initial state values for the Seasonal component

  • rho1,...,rho[k] e.g. rho12, the coefficients on the regressors

scale

whether to rescale the data using y/max(y) (only for additive models). This sometimes helps in the optimization.

seasonal_init

whether the initial seasonal states are estimated or fixed (set to a backcast approximation).

lower

the lower bound for the transformation.

upper

the upper bound for the transformation.

sampling

sampling frequency of the dataset. If NULL, will try to identify from the timestamps of y. This is useful for plotting and extending the timestamps in the prediction horizon.

xreg_init

whether to find initial estimates for the regressors with tighter lower and upper bounds. This is only applicable for additive error models.

...

not used.

Details

The specification object holds the information and data which is then passed to the maximum likelihood estimation routines.

Value

An object of class “tsets.spec”.


tsmodels/tsets documentation built on Oct. 8, 2022, 9:15 a.m.