Learn R Programming

smooth (version 4.3.1)

ces: Complex Exponential Smoothing

Description

Function estimates CES in state space form with information potential equal to errors and returns several variables.

Usage

ces(y, seasonality = c("none", "simple", "partial", "full"),
  lags = c(frequency(y)), initial = c("backcasting", "optimal",
  "two-stage", "complete"), a = NULL, b = NULL, loss = c("likelihood",
  "MSE", "MAE", "HAM", "MSEh", "TMSE", "GTMSE", "MSCE"), h = 0,
  holdout = FALSE, bounds = c("admissible", "none"), silent = TRUE,
  model = NULL, xreg = NULL, regressors = c("use", "select", "adapt"),
  initialX = NULL, ...)

auto.ces(y, seasonality = c("none", "simple", "partial", "full"), lags = c(frequency(y)), initial = c("backcasting", "optimal", "two-stage", "complete"), ic = c("AICc", "AIC", "BIC", "BICc"), loss = c("likelihood", "MSE", "MAE", "HAM", "MSEh", "TMSE", "GTMSE", "MSCE"), h = 0, holdout = FALSE, bounds = c("admissible", "none"), silent = TRUE, xreg = NULL, regressors = c("use", "select", "adapt"), ...)

ces_old(y, seasonality = c("none", "simple", "partial", "full"), initial = c("backcasting", "optimal"), a = NULL, b = NULL, ic = c("AICc", "AIC", "BIC", "BICc"), loss = c("likelihood", "MSE", "MAE", "HAM", "MSEh", "TMSE", "GTMSE", "MSCE"), h = 10, holdout = FALSE, bounds = c("admissible", "none"), silent = c("all", "graph", "legend", "output", "none"), xreg = NULL, regressors = c("use", "select"), initialX = NULL, ...)

Arguments

Value

Object of class "adam" is returned with similar elements to the adam function.

Details

The function estimates Complex Exponential Smoothing in the state space form described in Svetunkov et al. (2022) with the information potential equal to the approximation error.

The auto.ces() function implements the automatic seasonal component selection based on information criteria.

ces_old() is the old implementation of the model and will be discontinued starting from smooth v4.5.0.

ces() uses two optimisers to get good estimates of parameters. By default these are BOBYQA and then Nelder-Mead. This can be regulated via ... - see details below.

For some more information about the model and its implementation, see the vignette: vignette("ces","smooth")

References

  • Svetunkov I. (2023) Smooth forecasting with the smooth package in R. arXiv:2301.01790. tools:::Rd_expr_doi("10.48550/arXiv.2301.01790").

  • Svetunkov I. (2015 - Inf) "smooth" package for R - series of posts about the underlying models and how to use them: https://openforecast.org/category/r-en/smooth/.

  • Svetunkov, I. (2023). Forecasting and Analytics with the Augmented Dynamic Adaptive Model (ADAM) (1st ed.). Chapman and Hall/CRC. tools:::Rd_expr_doi("10.1201/9781003452652"), online version: https://openforecast.org/adam/.

  • Svetunkov, I., 2023. Smooth Forecasting with the Smooth Package in R. arXiv. tools:::Rd_expr_doi("10.48550/arXiv.2301.01790")

  • Snyder, R. D., 1985. Recursive Estimation of Dynamic Linear Models. Journal of the Royal Statistical Society, Series B (Methodological) 47 (2), 272-276.

  • Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, Springer-Verlag. tools:::Rd_expr_doi("10.1007/978-3-540-71918-2").

  • Svetunkov, I., Kourentzes, N., & Ord, J. K. (2022). Complex exponential smoothing. Naval Research Logistics, 69(8), 1108–1123. https://doi.org/10.1002/nav.22074

See Also

adam, es

Examples

Run this code
y <- rnorm(100,10,3)
ces(y, h=20, holdout=FALSE)

y <- 500 - c(1:100)*0.5 + rnorm(100,10,3)
ces(y, h=20, holdout=TRUE)

ces(BJsales, h=8, holdout=TRUE)

ces(AirPassengers, h=18, holdout=TRUE, seasonality="s")
ces(AirPassengers, h=18, holdout=TRUE, seasonality="p")
ces(AirPassengers, h=18, holdout=TRUE, seasonality="f")

y <- ts(rnorm(100,10,3),frequency=12)
# CES with and without holdout
auto.ces(y,h=20,holdout=TRUE)
auto.ces(y,h=20,holdout=FALSE)


# Selection between "none" and "full" seasonalities
auto.ces(AirPassengers, h=12, holdout=TRUE,
                   seasonality=c("n","f"), ic="AIC")

ourModel <- auto.ces(AirPassengers)

summary(ourModel)
forecast(ourModel, h=12)

Run the code above in your browser using DataLab