The data set used is called BJsales, it is a built in time series data set that contains the monthly sales of a company called BJ. The data set coveres a time period from January 1980 to November 1995, it has 150 observations. The data set has two variables called Sales: the monthly sales measured in thousands, and Time. This data set will be used to test exponential smoothing methods.
Printing the first few observation in the data set.
## Time Series:
## Start = 1
## End = 10
## Frequency = 1
## [1] 200.1 199.5 199.4 198.9 199.0 200.2 198.6 200.0 200.3 201.2
This code fits several exponential smoothing models to the training data of the BJsales time series and then computes and tabulates the accuracy measures of each model based on the training data. The code divides the data set into a training set (train_sales) consisting of the first 138 observations and a test set (test_sales) consisting of the remaining 12 observations. The training set is converted to a time series object sales, which is then used as input for fitting eight different exponential smoothing models
Interpreting the table, allows for the comparison of the accuracy of each exponential smoothing model in terms of its error metrics and autocorrelation. The lower the values of RMSE, MAE, MPE, and MAPE, the more accurate the model’s forecasts are. Similarly, the closer to zero the values of ME and ACF1, the better the model’s forecasts.
Therefore, the table shows that the Holt linear model (second row) has the lowest RMSE, MAE, and MAPE, indicating that it has the best overall accuracy among the models tested. The Holt Add. Damped and Holt Exp. Damped models have similar accuracy measures, while the SES model has a higher MAE and MAPE than the damped models. The HW models have the highest error measures overall, with the multiplicative damped model having the highest MAPE and the highest ACF1, indicating that it has the worst accuracy and highest level of autocorrelation.
Each model performs well under certain tests, however, it seems that the Holt linear model and the Holt additive damped model generally perform well across multiple accuracy measures.
| ME | RMSE | MAE | MPE | MAPE | MASE | ACF1 | |
|---|---|---|---|---|---|---|---|
| SES | 0.4160 | 1.5286 | 1.1827 | 0.1805 | 0.5240 | 0.1432 | 0.3109 |
| Holt Linear | 0.0023 | 1.3834 | 1.0865 | 0.0062 | 0.4822 | 0.1315 | 0.0075 |
| Holt Add. Damped | 0.1416 | 1.3536 | 1.0607 | 0.0644 | 0.4712 | 0.1284 | -0.0083 |
| Holt Exp. Damped | 0.1367 | 1.3531 | 1.0603 | 0.0622 | 0.4710 | 0.1284 | -0.0076 |
| HW Add. | -0.0054 | 1.5102 | 1.1398 | 0.0041 | 0.5074 | 0.1380 | 0.1276 |
| HW Exp. | -0.2030 | 2.4848 | 1.9070 | -0.0897 | 0.8595 | 0.2309 | 0.5186 |
| HW Add. Damp | 0.1608 | 1.3774 | 1.0710 | 0.0729 | 0.4746 | 0.1297 | 0.1377 |
| HW Exp. Damp | 0.0051 | 1.4019 | 1.1199 | 0.0018 | 0.4988 | 0.1356 | 0.1454 |
This plots the training data and the fitted values for various smoothing models. Since all of the values are plotted on top of each other, it is virtually impossible to determine the best smoothing model, therefore, it is necessary to look at the raw data to make a decision.
To get a better look at the models, a table with the accuracy measures of the exponential smoothing models is created based off the training data. The table shows the accuracy measures of various exponential smoothing models. The two measures of accuracy are Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE).
In this case, the Holt.Exp seems to perform the best overall, as it has the smallest MSE value (13.16919) and the second lowest MAPE value (1.143984). while the worst model appears to be HW.Exp.Damp as it has the highest MSE and MAPE values at 20.73814, 1.496650 respectively.
| MSE | MAPE | |
|---|---|---|
| SES | 14.68208 | 1.203902 |
| Holt.Add | 14.49524 | 1.196705 |
| Holt.Add.Damp | 13.34447 | 1.151072 |
| Holt.Exp | 13.16919 | 1.143984 |
| HW.Add | 13.68710 | 1.143327 |
| HW.Exp | 13.21080 | 1.220724 |
| HW.Add.Damp | 20.14323 | 1.443525 |
| HW.Exp.Damp | 20.73814 | 1.496650 |
Alpha controls the weighting distribution of the observations, with a higher alpha meaning that recent observations are more heavily weighted while a lower alpha means older observations are weighted heavier. The table shows that alpha is 0.9999 meaning that in this case the more recent observations are weighted the most. Additionally, since there is no trend or seasonality which gamma and beta rely upon, both of their values are 0.
| x | |
|---|---|
| alpha | 0.9999548 |
| beta | 0.0000000 |
| gamma | 0.0000000 |