 TimeSeriesAnalysis - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : Time Series Analysis Package : TimeSeriesAnalysis/Specialize

TimeSeriesAnalysis

 Specialize
 specialize an exponential smoothing model

 Calling Sequence Specialize(model, ts, opts)

Parameters

 model - ts - Time series consisting of a single data set opts - (optional) equation of the form avoidnumericalproblems = true or false

Description

 • The Specialize command takes a general Exponential Smoothing model, model (one where multiple options for errors, trend, and/or seasonal influence are possible), and returns the list of all specialized models that are compatible with the settings in model. Specialized models here means that these properties have a single, well-defined value.
 • In the sense of the previous paragraph, a general model is displayed as, for example, $\mathrm{< an ETS\left(*,*,*\right) model >}$ with at least one asterisk, whereas a specialized model is displayed as, for example, $\mathrm{< an ETS\left(A,Ad,N\right) model >}$, with no asterisks.
 • Only models appropriate for the given time series are returned. That is, if the time series has period 1 and the period for model has not been explicitly specified in its construction, or for periods greater than 24, no models with seasonal properties are used; and if the time series contains zeroes or negative numbers, then models with multiplicative errors are also disabled.
 • Some combinations of settings lead to numerical problems. In particular, the variance of forecasts is infinite. Models with such settings are, by default, not returned. If you want to include such models, you can use the option avoidnumericalproblems = false.

Examples

 > $\mathrm{with}\left(\mathrm{TimeSeriesAnalysis}\right):$

Consider an all-positive time series with period greater than one:

 > $\mathrm{ts}≔\mathrm{TimeSeries}\left(\left[1.8,3.4,2.1,2.9,2.4,2.9,2.5,3.1\right],\mathrm{period}=2\right)$
 ${\mathrm{ts}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{data set}}\\ {\mathrm{8 rows of data:}}\\ {\mathrm{2012 - 2019}}\end{array}\right]$ (1)

This will generate all models that do not have numerical problems:

 > $\mathrm{Specialize}\left(\mathrm{ExponentialSmoothingModel}\left(\right),\mathrm{ts}\right)$
 $\left[{\mathrm{< an ETS\left(A,A,A\right) model >}}{,}{\mathrm{< an ETS\left(A,A,N\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(A,N,A\right) model >}}{,}{\mathrm{< an ETS\left(A,N,N\right) model >}}{,}{\mathrm{< an ETS\left(M,A,A\right) model >}}{,}{\mathrm{< an ETS\left(M,A,M\right) model >}}{,}{\mathrm{< an ETS\left(M,A,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(M,M,M\right) model >}}{,}{\mathrm{< an ETS\left(M,M,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,N\right) model >}}{,}{\mathrm{< an ETS\left(M,N,A\right) model >}}{,}{\mathrm{< an ETS\left(M,N,M\right) model >}}{,}{\mathrm{< an ETS\left(M,N,N\right) model >}}\right]$ (2)

If we want all 30 possible models, we can do this:

 > $\mathrm{Specialize}\left(\mathrm{ExponentialSmoothingModel}\left(\right),\mathrm{ts},\mathrm{avoidnumericalproblems}=\mathrm{false}\right)$
 $\left[{\mathrm{< an ETS\left(A,A,A\right) model >}}{,}{\mathrm{< an ETS\left(A,A,M\right) model >}}{,}{\mathrm{< an ETS\left(A,A,N\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,M\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(A,M,A\right) model >}}{,}{\mathrm{< an ETS\left(A,M,M\right) model >}}{,}{\mathrm{< an ETS\left(A,M,N\right) model >}}{,}{\mathrm{< an ETS\left(A,Md,A\right) model >}}{,}{\mathrm{< an ETS\left(A,Md,M\right) model >}}{,}{\mathrm{< an ETS\left(A,Md,N\right) model >}}{,}{\mathrm{< an ETS\left(A,N,A\right) model >}}{,}{\mathrm{< an ETS\left(A,N,M\right) model >}}{,}{\mathrm{< an ETS\left(A,N,N\right) model >}}{,}{\mathrm{< an ETS\left(M,A,A\right) model >}}{,}{\mathrm{< an ETS\left(M,A,M\right) model >}}{,}{\mathrm{< an ETS\left(M,A,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(M,M,A\right) model >}}{,}{\mathrm{< an ETS\left(M,M,M\right) model >}}{,}{\mathrm{< an ETS\left(M,M,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,A\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,N\right) model >}}{,}{\mathrm{< an ETS\left(M,N,A\right) model >}}{,}{\mathrm{< an ETS\left(M,N,M\right) model >}}{,}{\mathrm{< an ETS\left(M,N,N\right) model >}}\right]$ (3)

A model with negative data and period 1 has only three applicable models.

 > $\mathrm{ts2}≔\mathrm{TimeSeries}\left(\left[2.7,1.8,0.3,-2.3,-2.6,-0.9\right]\right)$
 ${\mathrm{ts2}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{data set}}\\ {\mathrm{6 rows of data:}}\\ {\mathrm{2014 - 2019}}\end{array}\right]$ (4)
 > $\mathrm{Specialize}\left(\mathrm{ExponentialSmoothingModel}\left(\right),\mathrm{ts2}\right)$
 $\left[{\mathrm{< an ETS\left(A,A,N\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(A,N,N\right) model >}}\right]$ (5)

References

 Hyndman, R.J. and Athanasopoulos, G. (2013) Forecasting: principles and practice. http://otexts.org/fpp/. Accessed on 2013-10-09.
 Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with Exponential Smoothing: The State Space Approach. Springer Series in Statistics. Springer-Verlag Berlin Heidelberg.

Compatibility

 • The TimeSeriesAnalysis[Specialize] command was introduced in Maple 18.