Learn R Programming

⚠️There's a newer version (4.2.0) of this package.Take me there.

smooth

The package smooth contains several smoothing (exponential and not) functions that are used in forecasting.

Here is the list of included functions:

  1. es - the ETS function. It can handle exogenous variables and has a handy "holdout" parameter. There are several cost function implemented, including trace forecast based ones. Model selection is done via branch and bound algorithm and there's a possibility to use AIC weights in order to produce combined forecasts. Finally, all the possible ETS functions are implemented here.
  2. ces - Complex Exponential Smoothing. Function estimates CES and makes forecast. See documentation for details.
  3. ges - Generalised Exponential Smoothing. Next step from CES. The paper on this is in the process.
  4. ves - Vector Exponential Smoothing. Vector form of the ETS model.
  5. ssarima - SARIMA estimated in state-space framework. Allows multiple seasonalities.
  6. auto.ces - selection between seasonal and non-seasonal CES models.
  7. auto.ssarima - selection between different State-Space ARIMA models.
  8. sim.es - simulation of data using ETS framework with a predefined (or random) smoothing parameters and initial values.
  9. sim.ssarima - simulation of data using State-Space ARIMA framework with a predefined (or randomly generated) parameters and initial values.
  10. sim.ces - simulation of data using CES with a predefined (or random) complex smoothing parameters and initial values.
  11. sim.ges - simulation functions for GES.
  12. sma - Simple Moving Average in state-space form.
  13. iss - Intermittent data state-space model. This function models the part with data occurrences using one of three methods: Croston's, TSB and fixed probability.

Future works:

  1. ves - Vector Exponential Smoothing. This is similar to es, but for multivariate data rather than univariate.
  2. auto.ges - Automatic selection of the most appropriate GES model.
  3. cma - Centred Moving Average. This should be based on sma(), but would be available for time series decomposition.
  4. nus - Non-uniform Smoothing. The estimation method used in order to update parameters of regression models.
  5. sofa - Survival of the fittest algorithm applied to state-space models.

Installation

The stable version of the package is available on CRAN, so you can install it by running:

install.packages("smooth")

A recent, development version, is available via github and can be installed using "devtools" in R. Firstly make sure that you have devtools:

if (!require("devtools")){install.packages("devtools")}

and after that run:

devtools::install_github("config-i1/smooth")

Notes

The package depends on Rcpp and RcppArmadillo, which will be installed automatically.

However Mac OS users may need to install gfortran libraries in order to use Rcpp. Follow the link for the instructions: http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/

Sometimes after upgrade of smooth from previous versions some functions stop working. This is because C++ functions are occasionally stored in deeper unknown corners of R's mind. Restarting R usually solves the problem. If it doesn't, completely remove smooth (uninstall + delete the folder "smooth" from R packages folder), restart R and reinstall smooth.

Copy Link

Version

Install

install.packages('smooth')

Monthly Downloads

7,177

Version

2.2.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Ivan Svetunkov

Last Published

November 15th, 2017

Functions in smooth (2.2.1)

es

Exponential Smoothing in SSOE state-space model
ces

Complex Exponential Smoothing
ges

General Exponential Smoothing
auto.ssarima

State-Space ARIMA
graphmaker

Linear graph construction function
MPE

Error measures
AICc

Corrected Akaike's Information Criterion
sim.ges

Simulate Generalised Exponential Smoothing
sim.ces

Simulate Complex Exponential Smoothing
auto.ces

Complex Exponential Smoothing Auto
pointLik

Point likelihood values
auto.ges

Automatic GES
nParam

Number of parameters in the model
pls

Prediction Likelihood Score
forecast.smooth

Forecasting time series using smooth functions
sowhat

Function returns the ultimate answer to any question
orders

Functions that extract values from the fitted model
ssarima

State-Space ARIMA
sim.sma

Simulate Simple Moving Average
hm

Half moment of a distribution and its derivatives.
sim.ssarima

Simulate SSARIMA
iss

Intermittent State Space
stepwise

Stepwise selection of regressors
sim.es

Simulate Exponential Smoothing
ves

Vector Exponential Smoothing in SSOE state-space model
reexports

Objects exported from other packages
xregExpander

Exogenous variables expander
sma

Simple Moving Average
smooth

Smooth package