Description Usage Arguments Details Value Note Author(s) See Also Examples
Performs a simple exponential smoothing for univariate time series with no trend or seasonal pattern.
1 2 |
x |
a numeric vector or univariate time series. |
trend |
the type of trend. See details. |
alpha |
the smoothing parameter for constant component. The default is |
beta |
the smoothing parameter for linear component. The default is |
gamma |
the smoothing parameter for quadratic component. The default is |
lead |
the number of steps ahead for which prediction is required.
The default is |
plot |
a logical value indicating to print the plot of original data v.s smoothed
data. The default is |
Simple exponential smoothing is a weighted average between the most recent
observation and the most recent forecasting, with weights α and
1 - α, respectively. To be precise, the smoothing equation of single exponential
smoothing (constant model, trend = 1
) is given by
level[t] = α *x[t] + (1 - α)*level[t-1],
and the forecasting equation is
hat{x}[t+1|t] = level[t],
for t = 1,...,n. The initial value level[0] = x[1]. For example, hat{x}[1|0] = level[0], hat{x}[2|1] = level[1],..., etc.
Let x1[t] be the smoothed values of single exponential smoothing. The double
exponential smoothing (trend = 2
, a linear model) is to apply a single
exponential smoothing again to the smoothed sequence x1[t], with a new smoothing
parameter beta
. Similarly, we denote the smoothed values of double
exponential smoothing to be x2[t]. The triple exponential smoothing
(trend = 3
, a quadratic model) is to apply the single exponential smoothing
to the smoothed sequence x2[t] with a new smoothing parameter gamma
. The
default smoothing parameters (weights) alpha
, beta
, gamma
are
taken from the equation 1 - 0.8^{1/trend}
respectively, which is similar
to the FORECAST procedure in SAS.
A list with class "es"
containing the following components:
estimate |
the smoothed values. |
pred |
the predicted values when |
accurate |
the accurate measurements. |
Missing values are removed before the analysis.
Debin Qiu
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.