smooth function

Smooth package

Smooth package

Package contains functions implementing Single Source of Error state space models for purposes of time series analysis and forecasting.

Details

Package:smooth
Type:Package
Date:2016-01-27 - Inf
License:GPL-2

The following functions are included in the package:

  • es - Exponential Smoothing in Single Source of Errors State Space form.
  • ces - Complex Exponential Smoothing.
  • gum - Generalised Exponential Smoothing.
  • ssarima - SARIMA in state space framework.
  • auto.ces - Automatic selection between seasonal and non-seasonal CES.
  • auto.ssarima - Automatic selection of ARIMA orders.
  • sma - Simple Moving Average in state space form.
  • smoothCombine - the function that combines forecasts from es(), ces(), gum(), ssarima() and sma() functions.
  • cma - Centered Moving Average. This is for smoothing time series, not for forecasting.
  • sim.es - simulate time series using ETS as a model.
  • sim.ces - simulate time series using CES as a model.
  • sim.ssarima - simulate time series using SARIMA as a model.
  • sim.gum - simulate time series using GUM as a model.
  • sim.sma - simulate time series using SMA.
  • sim.oes - simulate time series based on occurrence part of ETS model.
  • oes - occurrence part of the intermittent state space model.

There are also several methods implemented in the package for the classes "smooth" and "smooth.sim":

  • orders - extracts orders of the fitted model.
  • lags - extracts lags of the fitted model.
  • modelType - extracts type of the fitted model.
  • forecast - produces forecast using provided model.
  • multicov - returns covariance matrix of multiple steps ahead forecast errors.
  • pls - returns Prediction Likelihood Score.
  • nparam - returns number of the estimated parameters.
  • fitted - extracts fitted values from provided model.
  • getResponse - returns actual values from the provided model.
  • residuals - extracts residuals of provided model.
  • plot - plots either states of the model or produced forecast (depending on what object is passed).
  • simulate - uses sim functions (sim.es , sim.ces , sim.ssarima , sim.gum , sim.sma and sim.oes ) in order to simulate data using the provided object.
  • summary - provides summary of the object.
  • AICc, BICc - return, guess what...

Examples

y <- ts(rnorm(100,10,3), frequency=12) adam(y, h=20, holdout=TRUE) es(y, h=20, holdout=TRUE) gum(y, h=20, holdout=TRUE) auto.ces(y, h=20, holdout=TRUE) auto.ssarima(y, h=20, holdout=TRUE)

References

  • 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 Ivan and Boylan John E. (2017). Multiplicative State-Space Models for Intermittent Time Series. Working Paper of Department of Management Science, Lancaster University, 2017:4 , 1-43.

  • Teunter R., Syntetos A., Babai Z. (2011). Intermittent demand: Linking forecasting to inventory obsolescence. European Journal of Operational Research, 214, 606-615.

  • Croston, J. (1972) Forecasting and stock control for intermittent demands. Operational Research Quarterly, 23(3), 289-303.

  • Syntetos, A., Boylan J. (2005) The accuracy of intermittent demand estimates. International Journal of Forecasting, 21(2), 303-314.

  • 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

  • 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/.

  • Kolassa, S. (2011) Combining exponential smoothing forecasts using Akaike weights. International Journal of Forecasting, 27, pp 238 - 251.

  • Taylor, J.W. and Bunn, D.W. (1999) A Quantile Regression Approach to Generating Prediction Intervals. Management Science, Vol 45, No 2, pp 225-237.

  • Lichtendahl Kenneth C., Jr., Grushka-Cockayne Yael, Winkler Robert L., (2013) Is It Better to Average Probabilities or Quantiles? Management Science 59(7):1594-1611. DOI: tools:::Rd_expr_doi("10.1287/mnsc.1120.1667")

See Also

forecast, es, ssarima, ces, gum

Author(s)

Ivan Svetunkov, ivan@svetunkov.com

  • Maintainer: Ivan Svetunkov
  • License: LGPL-2.1
  • Last published: 2025-04-02