a. Compare the SSE measures of Holt’s method for the two series to those of simple exponential smoothing in the previous question. Discuss the merits of the two forecasting methods for these data sets.
Paperback
# paperback Simple
pbackHS <- holt(pback, initial="simple", h=4)
summary(pbackHS)
##
## Forecast method: Holt's method
##
## Model Information:
## Holt's method
##
## Call:
## holt(y = pback, h = 4, initial = "simple")
##
## Smoothing parameters:
## alpha = 0.2984
## beta = 0.4984
##
## Initial states:
## l = 199
## b = -27
##
## sigma: 40
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set 7.8 40 34 1.6 18 0.85 -0.11
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 31 222 171 273 145 300
## 32 230 165 294 131 329
## 33 237 145 330 96 378
## 34 245 116 375 47 443
Using Holt’s method with initial set to simple, the forecast for the next four days is significantly higher than the SES forecast. The Holt method also reflects the upward trend in the four day forecast.
# paperback optimal
pbackH <- holt(pback, initial="optimal", h=4)
summary(pbackH)
##
## Forecast method: Holt's method
##
## Model Information:
## Holt's method
##
## Call:
## holt(y = pback, h = 4, initial = "optimal")
##
## Smoothing parameters:
## alpha = 0.0001
## beta = 0.0001
##
## Initial states:
## l = 174.6003
## b = 1.0606
##
## sigma: 32
##
## AIC AICc BIC
## 319 322 326
##
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -4.5 32 26 -6 16 0.67 -0.14
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 31 207 166 248 145 269
## 32 208 168 249 146 270
## 33 209 169 250 147 271
## 34 210 170 251 148 272
With Initial set to optimal, the forecast is closer to the forecast for both the SES simple and optimal forecasts.
Hardcover
# hardcover Smiple
hcoverHS <- holt(hcover, initial="simple", h=4)
summary(hcoverHS)
##
## Forecast method: Holt's method
##
## Model Information:
## Holt's method
##
## Call:
## holt(y = hcover, h = 4, initial = "simple")
##
## Smoothing parameters:
## alpha = 0.439
## beta = 0.1574
##
## Initial states:
## l = 139
## b = -11
##
## sigma: 35
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set 7.2 35 28 2.4 14 0.84 -0.077
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 31 251 206 296 182 319
## 32 255 202 307 175 335
## 33 259 196 321 163 354
## 34 263 188 337 149 377
Using Holt’s method with initial set to simple and optimal both generated forecasts for the next four days higher than the SES model.
Again, the Holt method reflected the upward trend in the four day forecast.
# hardcover Optimal
hcoverH <- holt(hcover, initial="optimal", h=4)
summary(hcoverH)
##
## Forecast method: Holt's method
##
## Model Information:
## Holt's method
##
## Call:
## holt(y = hcover, h = 4, initial = "optimal")
##
## Smoothing parameters:
## alpha = 0.0001
## beta = 0.0001
##
## Initial states:
## l = 154.6543
## b = 2.9961
##
## sigma: 27
##
## AIC AICc BIC
## 311 313 318
##
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -2.2 27 23 -3.4 12 0.7 -0.027
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 31 247 212 283 194 301
## 32 250 215 286 197 304
## 33 253 218 288 200 307
## 34 256 221 291 203 310
With Initial set to optimal, the forecast is closer to the forecast for both the SES simple and optimal forecasts.
b. Compare the forecasts for the two series using both methods. Which do you think is best?
Compare the SSE measures of Holt’s method for paperbacks and hardcovers with those of the SES models
Paperback
# Paperback plot of all forecasts
autoplot(pback) + xlab("day") + ylab("Sales") + autolayer(optpbackSimple, PI=FALSE, series="SES Simple") + autolayer(optpbackOptimal, PI=FALSE, series="SES optimal") + autolayer(pbackH, series="Holt Optimal", PI=FALSE) + autolayer(pbackHS, series="Holt Simple", PI=FALSE)

Comparing the simple and optimal forecasts using both SES and Holt’s methods, I would recommend the Holt optimal forecast. This forecast reflects the upward trend that the SES forecasts don’t, and it puts adequate weight on the earlier data.
Running the accuracy function confirms that Holt’s optimal forecast has the lowest MAPE and RMSE.
# Run Accuracy check for forecasts
print("Paperback - SES Simple")
## [1] "Paperback - SES Simple"
accuracy(optpbackSimple$fitted, pback)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 1.7 35 29 -2.8 17 -0.13 0.68
print("Paperback - SES Optimal")
## [1] "Paperback - SES Optimal"
accuracy(optpbackOptimal$fitted, pback)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 7.2 34 28 0.47 16 -0.21 0.67
print("Paperback - Holt Simple")
## [1] "Paperback - Holt Simple"
accuracy(pbackHS$fitted, pback)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 7.8 40 34 1.6 18 -0.11 0.88
print("Paperback - Holt Optimal")
## [1] "Paperback - Holt Optimal"
accuracy(pbackH$fitted, pback)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set -4.5 32 26 -6 16 -0.14 0.61
Hardcover
# Hardcover plot of all forecasts
autoplot(hcover) + xlab("day") + autolayer(opthcoverSimple, PI=FALSE, series="SES Simple") + autolayer(opthcoverOptimal, PI=FALSE, series="SES optimal") + autolayer(hcoverH, series="Holt Optimal", PI=FALSE) + autolayer(hcoverHS, series="Holt Simple", PI=FALSE)

Comparing the simple and optimal forecasts using both SES and Holt’s methods for hardcover, I would also recommend the Holt optimal forecast, for the same reason. NOTE, the SES optimal and Simple both generated the same forecast.
Running the accuracy function confirms that Holt’s optimal forecast has the lowest MAPE and RMSE.
# Run Accuracy check for forecasts
print("Hardcover - SES Simple")
## [1] "Hardcover - SES Simple"
accuracy(opthcoverSimple$fitted, hcover)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 9.7 32 26 3.1 13 -0.16 0.81
print("Hardcover - SES Optimale")
## [1] "Hardcover - SES Optimale"
accuracy(opthcoverOptimal$fitted, hcover)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 9.2 32 27 2.6 13 -0.14 0.81
print("Hardcover - Holt Simple")
## [1] "Hardcover - Holt Simple"
accuracy(hcoverHS$fitted, hcover)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set 7.2 35 28 2.4 14 -0.077 0.92
print("Hardcover - Holt Optimal")
## [1] "Hardcover - Holt Optimal"
accuracy(hcoverH$fitted, hcover)
## ME RMSE MAE MPE MAPE ACF1 Theil's U
## Test set -2.2 27 23 -3.4 12 -0.027 0.66
c. Calculate a 95% prediction interval for the first forecast for each series using both methods, assuming normal errors. Compare your forecasts with those produced by R.
Paperback - Holt’s Optimal forecast with Predication Intervals
# Calculate 95% Prediction interval, and plot
autoplot(forecast(pbackH, h=4), ylab="Paperback Books Sold", xlab="Day")

Calculating the 95th percent interval for the first day’s forecast manually would give:
ForecastDay31= ValueDay30 +/- 1.96 x sigma, where sigma = 32 & ValueDay30=247 —> ForecastDay31= 184 to 310
From the output of the forecast summary the 95th% interval was 145 to 269
Hardcover - Holt’s Optimal forecast with Predication Intervals
# Calculate 95% Prediction interval, and plot
autoplot(forecast(hcoverH, h=4), ylab="Hardcover Books Sold", xlab="Day")

Calculating the 95th percent interval for the first day’s forecast manually would give:
ForecastDay31= ValueDay30 +/- 1.96 x sigma, where sigma = 27 & ValueDay30=259 —> ForecastDay31= 206 to 312
From the output of the forecast summary the 95th% interval was 194 to 301