# 7.8 Exercises

1. Data set books contains the daily sales of paperback and hardcover books at the same store. The task is to forecast the next four days’ sales for paperback and hardcover books (data set books).
1. Plot the series and discuss the main features of the data.
2. Use simple exponential smoothing with the ses function (setting initial="simple") and explore different values of $\alpha$ for the paperback series. Record the within-sample SSE for the one-step forecasts. Plot SSE against $\alpha$ and find which value of $\alpha$ works best. What is the effect of $\alpha$ on the forecasts?
3. Now let ses select the optimal value of $\alpha$. Use this value to generate forecasts for the next four days. Compare your results with 2.
4. Repeat but with initial="optimal". How much difference does an optimal initial level make?
5. Repeat steps (b)–(d) with the hardcover series.
2. Apply Holt’s linear method to the paperback and hardback series and compute four-day forecasts in each case.
1. 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.
2. Compare the forecasts for the two series using both methods. Which do you think is best?
3. 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.
3. For this exercise, use the quarterly UK passenger vehicle production data from 1977:1--2005:1 (data set ukcars).
1. Plot the data and describe the main features of the series.
2. Decompose the series using STL and obtain the seasonally adjusted data.
3. Forecast the next two years of the series using an additive damped trend method applied to the seasonally adjusted data. Then reseasonalize the forecasts. Record the parameters of the method and report the RMSE of the one-step forecasts from your method.
4. Forecast the next two years of the series using Holt's linear method applied to the seasonally adjusted data. Then reseasonalize the forecasts. Record the parameters of the method and report the RMSE of of the one-step forecasts from your method.
5. Now use ets() to choose a seasonal model for the data.
6. Compare the RMSE of the fitted model with the RMSE of the model you obtained using an STL decomposition with Holt's method. Which gives the better in-sample fits?
7. Compare the forecasts from the two approaches? Which seems most reasonable?
4. For this exercise, use the monthly Australian short-term overseas visitors data, May 1985--April 2005. (Data set: visitors.)
1. Make a time plot of your data and describe the main features of the series.
2. Forecast the next two years using Holt-Winters' multiplicative method.
3. Why is multiplicative seasonality necessary here?
4. Experiment with making the trend exponential and/or damped.
5. Compare the RMSE of the one-step forecasts from the various methods. Which do you prefer?
6. Now fit each of the following models to the same data:
1. a multiplicative Holt-Winters' method;
2. an ETS model;
3. an additive ETS model applied to a Box-Cox transformed series;
4. a seasonal naive method applied to the Box-Cox transformed series;
5. an STL decomposition applied to the Box-Cox transformed data followed by an ETS model applied to the seasonally adjusted (transformed) data.
7. For each model, look at the residual diagnostics and compare the forecasts for the next two years. Which do you prefer?