ETSmodel: ETSmodel

View source: R/ETSmodel.R

ETSmodelR Documentation

ETSmodel

Description

Estimates and forecasts ETS general univariate models

Usage

ETSmodel(
  y,
  u = NULL,
  model = "???",
  s = frequency(y),
  h = max(2 * s, 6),
  criterion = "aicc",
  lambda = 1,
  armaIdent = FALSE,
  identAll = FALSE,
  forIntervals = FALSE,
  bootstrap = FALSE,
  nSimul = 5000,
  verbose = FALSE,
  alphaL = c(1e-08, 1 - 1e-08),
  betaL = alphaL,
  gammaL = alphaL,
  phiL = c(0.8, 0.98),
  p0 = -99999
)

Arguments

y

a time series to forecast (it may be either a numerical vector or a time series object). This is the only input required. If a vector, the additional input s should be supplied compulsorily (see below).

u

a matrix of input time series. If the output wanted to be forecast, matrix u should contain future values for inputs.

model

the model to estimate. It is a single string indicating the type of model for each component with one or two letters:

  • Error: ? / A / M

  • Trend: ? / N / A / Ad / M / Md

  • Seasonal: ? / N / A / M

s

seasonal period of time series (1 for annual, 4 for quarterly, ...)

h

forecast horizon. If the model includes inputs h is not used, the lenght of u is used instead.

criterion

information criterion for identification ("aic", "bic" or "aicc").

lambda

Box-Cox lambda parameter (NULL: estimate)

armaIdent

check for arma models for error component (TRUE / FALSE).

identAll

run all models to identify the best one (TRUE / FALSE)

forIntervals

estimate forecasting intervals (TRUE / FALSE)

bootstrap

use bootstrap simulation for predictive distributions

nSimul

number of simulation runs for bootstrap simulation of predictive distributions

verbose

intermediate estimation output (TRUE / FALSE)

alphaL

constraints limits for alpha parameter

betaL

constraints limits for beta parameter

gammaL

constraints limits for gamma parameter

phiL

constraints limits for phi parameter

p0

initial values for parameter search (alpha, beta, phi, gamma) with consraints:

  • 0 < alpha < 1

  • 0 < beta < alpha

  • 0 < phi < 1

  • 0 < gamma < 1 - alpha

Details

ETSmodel is a function for modelling and forecasting univariate time series with ExponenTial Smoothing (ETS) time series models. It sets up the model with a number of control variables that govern the way the rest of functions in the package will work. It also estimates the model parameters by Maximum Likelihood and forecasts the data.

Value

An object of class ETS. It is a list with fields including all the inputs and the fields listed below as outputs. All the functions in this package fill in part of the fields of any ETS object as specified in what follows (function ETS fills in all of them at once):

After running ETSmodel or ETSestim:

p

Estimated parameters

criteria

Values for estimation criteria (LogLik, AIC, BIC, AICc)

yFor

Forecasted values of output

yForV

Variance of forecasted values of output

ySimul

Bootstrap simulations for forecasting distribution evaluation

After running ETSvalidate:

table

Estimation and validation table

comp

Estimated components in matrix form

After running ETScomponents:

comp

Estimated components in matrix form

Author(s)

Diego J. Pedregal

See Also

ETS, ETSvalidate, ETScomponents, ETSestim

Examples

## Not run: 
y <- log(AirPAssengers)
m1 <- ETSmodel(y)
m1 <- ETSmodel(y, model = "A?A")

## End(Not run)

UComp documentation built on May 31, 2023, 7:41 p.m.

Related to ETSmodel in UComp...