issm_modelspec: Model Specification

View source: R/specification.R

issm_modelspecR Documentation

Model Specification

Description

Specifies an ISSM model prior to estimation.

Usage

issm_modelspec(
  y,
  slope = TRUE,
  slope_damped = FALSE,
  seasonal = FALSE,
  seasonal_frequency = 1,
  seasonal_type = c("trigonometric", "regular"),
  seasonal_harmonics = NULL,
  ar = 0,
  ma = 0,
  xreg = NULL,
  transformation = "box-cox",
  lambda = 1,
  lower = 0,
  upper = 1,
  sampling = NULL,
  ...
)

Arguments

y

an xts vector.

slope

(Logical) slope component.

slope_damped

(Logical) slope dampening component.

seasonal

(Logical) seasonal component(s).

seasonal_frequency

vector of numeric seasonal frequencies. For trigonometric this can be fractional, but must be integer for regular seasonality.

seasonal_type

either trigonometric or regular. The latter currently does not allow multiple seasonality.

seasonal_harmonics

the number of harmonics per seasonal frequency for the trigonometric type.

ar

AR order.

ma

MA order.

xreg

an xts matrix of external regressors.

transformation

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

lambda

the Box Cox lambda. If not NULL, then either a numeric value or NA denoting automatic calculation.

lower

lower bound for the transformation.

upper

upper bound for the transformation.

sampling

(optional) 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.

...

not used.

Details

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

The specification performs some sanity checks on the arguments provided and sets up the required state space matrices and parameters which are used in the estimation stage.

Value

An object of class “tsissm.spec” with the following slots:

target

A list with original data series, the data series index and the sampling frequency

slope

A list with details about the slope state

seasonal

A list with details about the seasonal state

xreg

A list with details on the external regressors

transform

A list with details on the transformation

arma

A list with details on the ARMA state

S

A data.table with the vectorized state matrices

dims

A vector with dimensions and flags used in the estimation code

parmatrix

A data.table of the model parameters

idmatrix

A matrix with index information on the parameters

References

De Livera, Alysha M and Hyndman, Rob J and Snyder, Ralph D, 2011, Forecasting time series with complex seasonal patterns using exponential smoothing, Journal of the American Statistical Association, 106(496), 1513–1527.


tsmodels/tsissm documentation built on Oct. 15, 2022, 6:44 a.m.