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 |
Attaching package: 'aTSA'
The following object is masked from 'package:graphics':
identify
$estimate
[1] -0.295169429 -0.295169429 -0.295169429 -0.325102046 -0.364023375
[6] -0.372119307 -0.412300823 -0.464724923 -0.447356648 -0.403252944
[11] -0.351707256 -0.336180288 -0.305060856 -0.265418877 -0.237997237
[16] -0.230241979 -0.222046911 -0.191586792 -0.160492850 -0.101704884
[21] -0.039599638 0.046305105 0.108598413 0.134136535 0.150050198
[26] 0.138393354 0.144376303 0.152031215 0.130976786 0.105749909
[31] 0.104239370 0.102349488 0.114950864 0.123282296 0.149570084
[36] 0.209644514 0.236074819 0.233353966 0.247164217 0.232201812
[41] 0.171873192 0.122589758 0.085134305 0.053381759 0.051856165
[46] 0.059566028 0.073490886 0.071576955 0.044281377 0.027071113
[51] 0.003745173 -0.015973323 -0.045854371 -0.067443754 -0.124231538
[56] -0.144504270 -0.137087941 -0.120085750 -0.063633479 -0.024232452
[61] 0.023434917 0.084271022 0.141498917 0.155375144 0.191158002
[66] 0.211108739 0.244958764 0.283349917 0.278292678 0.268586611
[71] 0.272377822 0.260444610 0.287032098 0.319036533 0.336754017
[76] 0.320823666 0.293559038 0.302959840 0.308923865 0.310107255
[81] 0.296227661 0.305056208 0.292698619 0.238538040 0.174763177
[86] 0.118648375 0.078150059 0.042772356 0.011732641 0.021101663
[91] 0.010135834 0.008049266 0.007804790 0.014965853 0.042405471
[96] 0.078189741 0.085616976 0.093950521 0.092099440 0.062546215
$accurate
SST SSE MSE RMSE MAPE
9.330731e+01 9.935682e+01 1.013845e+00 1.006899e+00 1.472060e+02
MPE MAE ME R.squared R.adj.squared
1.096897e+02 8.089017e-01 3.293460e-02 -6.483429e-02 -7.569995e-02
RW.R.squared AIC SBC APC
-3.174835e+16 3.354745e+00 8.565085e+00 1.034122e+00
attr(,"class")
[1] "es"
$estimate
[1] -0.2951694292 -0.2951694292 -0.2951694292 -0.2951694292 -0.2973149992
[6] -0.3020966556 -0.3071158792 -0.3146555360 -0.3254125096 -0.3341534654
[11] -0.3391065161 -0.3400097371 -0.3397352422 -0.3372497822 -0.3321009429
[16] -0.3253555893 -0.3185378458 -0.3116213756 -0.3030172966 -0.2928011443
[21] -0.2791033644 -0.2619357373 -0.2398410337 -0.2148648942 -0.1898484717
[26] -0.1654845350 -0.1437025679 -0.1230530745 -0.1033350326 -0.0865395615
[31] -0.0727562522 -0.0600692060 -0.0484270340 -0.0367161063 -0.0252474209
[36] -0.0127165021 0.0032223355 0.0199132016 0.0352126355 0.0504053249
[41] 0.0634364971 0.0712092394 0.0748921950 0.0756263495 0.0740318572
[46] 0.0724423036 0.0715193322 0.0716606531 0.0716546537 0.0696925372
[51] 0.0666374334 0.0621293162 0.0565309190 0.0491919415 0.0408314949
[56] 0.0289997766 0.0165630066 0.0055493067 -0.0034562142 -0.0077697205
[61] -0.0089497691 -0.0066284348 -0.0001127617 0.0100379635 0.0204557326
[66] 0.0326916712 0.0454806067 0.0597792010 0.0758047499 0.0903190846
[71] 0.1030973009 0.1152313286 0.1256402166 0.1372087867 0.1502421995
[76] 0.1636113666 0.1748803442 0.1833872330 0.1919581974 0.2003422965
[81] 0.2082102488 0.2145193368 0.2210090198 0.2261477303 0.2270358677
[86] 0.2232889613 0.2157883240 0.2059224132 0.1942278171 0.1811465629
[91] 0.1696745445 0.1582388097 0.1474732232 0.1374617899 0.1286812812
[96] 0.1224970311 0.1193210846 0.1169051741 0.1152597845 0.1135996510
$accurate
SST SSE MSE RMSE MAPE
9.330731e+01 9.844221e+01 1.014868e+00 1.007407e+00 1.298677e+02
MPE MAE ME R.squared R.adj.squared
1.134463e+02 8.038034e-01 8.945100e-02 -5.503217e-02 -7.678541e-02
RW.R.squared AIC SBC APC
-3.145610e+16 4.429952e+00 1.224546e+01 1.045314e+00
attr(,"class")
[1] "es"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.