Problem 5.2

2). Relationship between Moving Average and Exponential Smoothing: Assume that we apply a moving average to a series, using a very short window span. If we wanted to achieve an equivalent result using exponential smoothing, what value should the smoothing constant take?

In order to acheive an equivalent result using exponential smoothing, the smoothing constant should be closer to 1. As the moving average uses a very short window span, older values would have less influence. In order to achieve a similar result, a smoothing constant closer to 1 will place heavier weight on the more recent values.

Problem 5.5

a). Which of the following methods would not be suitable for forecasting this series. Explain why or why not for each one

b). A forecaster was tasked to generate forecasts for 4 quarters ahead. She therefore partitioned the data so that the last 4 quarters were designated as the validation period. The foreccaster approached the forecasting task by using multiplicative Holt-Winter’s exponential smoothing. Specifically, you should call the hw function with the parameter seasonal=“multiplicative”.

bi). Run this method on the data. Request the forecasts on the validation period.(Note that the forecasted values for the validation set will be different than what the book shows.)

## 
## Forecast method: Holt-Winters' multiplicative method
## 
## Model Information:
## Holt-Winters' multiplicative method 
## 
## Call:
##  hw(y = depTrain, h = 4, seasonal = "multiplicative") 
## 
##   Smoothing parameters:
##     alpha = 0.4032 
##     beta  = 0.1429 
##     gamma = 0.4549 
## 
##   Initial states:
##     l = 57401.8119 
##     b = 605.4045 
##     s=1.3012 0.9795 0.8614 0.8579
## 
##   sigma:  0.0258
## 
##      AIC     AICc      BIC 
## 372.3936 390.3936 381.3552 
## 
## Error measures:
##                   ME     RMSE      MAE       MPE     MAPE      MASE
## Training set 246.631 1499.632 977.6487 0.3530739 1.665686 0.3137009
##                     ACF1
## Training set -0.07882461
## 
## Forecasts:
##      Point Forecast    Lo 80     Hi 80    Lo 95     Hi 95
## 6 Q1       61334.90 59303.21  63366.58 58227.70  64442.09
## 6 Q2       64971.30 62529.36  67413.25 61236.67  68705.94
## 6 Q3       76718.11 73376.84  80059.37 71608.08  81828.13
## 6 Q4       99420.55 94372.29 104468.81 91699.90 107141.20

bii). Using the forecasts for the validation set that you came up with in i. above, compute the MAPE values for the forecasts of quarters 21-22.

Quarter 21

##                     ME      RMSE      MAE        MPE      MAPE      MASE
## Training set  246.6310 1499.6322 977.6487  0.3530739 1.6656858 0.3137009
## Test set     -534.8988  534.8988 534.8988 -0.8797678 0.8797678 0.1716345
##                     ACF1
## Training set -0.07882461
## Test set              NA

Quarter 22

##                   ME     RMSE      MAE        MPE      MAPE       MASE
## Training set 246.631 1499.632 977.6487  0.3530739 1.6656858 0.31370087
## Test set     -71.303   71.303  71.3030 -0.1098659 0.1098659 0.02287919
##                     ACF1
## Training set -0.07882461
## Test set              NA

c). The fit and the residuals were displayed in the book. Please reproduce them with R code. Using all the information from (b) and your generated figures, is this model suitable for forecasting quarters 21 and 22?

Actual vs Forecast(Training Data)

Exponential Smoothing Forecast Errors(Training Data)

Yes this model would be suitable for forecasting quarters 21 and 22. The forecasted outcome is seemingly very accurate when compared to the actual.

d). Another analyst decided to take a much simpler approach, and instead of using exponential smoothing he used differencing. Use differencing to remove the trend and seasonal pattern. Which order works better: first removing trend and then seasonality or the the opposite order? Show a the progression of time plots as you difference the data and each final series to provide evidence in support of your answer

De-seasonalize First

De-Trend Second

De-Trend First

De-seasonalize Second

The results look the same regardless of what order things are done in.

e). Forecast quarters 21-22 using the average of the double-differenced series from (d). Remember to use only the training period (until quarter 20), and to adjust back for the trend and seasonal pattern.

## [1] 104207.2 125473.4

f). Compare the forecasts from (e) to the exponential smoothing forecasts found in (b). Which of the two forecasting methods would you choose? Explain.

In comparing the Holt-Winter smoothing against double-differencing with this data, it would seem that the double-differencing process is easier to use and required less steps.

g). What is an even simpler approach that should be compared as a baseline? Complete that comparison.

Comparing accuracy against the naive approach for Q21 and Q22

Q21

##                      ME     RMSE      MAE         MPE     MAPE      MASE
## Training set   2212.421 17122.92 14065.58  -0.3423223 22.56419  4.513261
## Test set     -31383.000 31383.00 31383.00 -51.6167763 51.61678 10.069950
##                    ACF1
## Training set -0.2899524
## Test set             NA

Q22

##                      ME     RMSE      MAE         MPE     MAPE     MASE
## Training set   2212.421 17122.92 14065.58  -0.3423223 22.56419 4.513261
## Test set     -27283.000 27283.00 27283.00 -42.0385208 42.03852 8.754372
##                    ACF1
## Training set -0.2899524
## Test set             NA

Problem 5.8

8). Forecasting Australian Wine Sales You are hired to obtain short-term forecasts (2-3 months ahead) for each of the six series, and this task will be repeated every month

a). Which smoothing method would you choose if you had to choose the same method for forecasting all series? Why?

The data appears to show both seasonality and trends. Provided the aforementioned observation, I would choose Holt-Winter method.

b). Fortified wine has the largest market share of the six types of wine. You are asked to focus on fortified wine sales alone and produce as accurate a forecast as possible for the next two months

Start by partitioning the data using the period until Dec- 1993 as the training period.

WineS <- read.csv("AustralianWines.csv", stringsAsFactors = FALSE)
WineS <- na.omit(WineS)
WineS.TS <- ts(WineS$Fortified, start = c(1980, 1), frequency = 12)
WineVL <- 12
WineTL <- length(WineS.TS) - WineVL
WineST <- window(WineS.TS,end = c(1980, WineTL))
WineSV <- window(WineS.TS, start = c(1980, WineTL + 1), end = c(1980, WineTL + WineVL))

Apply Holt-Winter’s exponential smoothing (with multiplicative seasonality) to sales.

## ETS(M,A,M) 
## 
## Call:
##  ets(y = WineST, model = "ZZM", restrict = FALSE) 
## 
##   Smoothing parameters:
##     alpha = 0.0555 
##     beta  = 9e-04 
##     gamma = 1e-04 
## 
##   Initial states:
##     l = 4040.0811 
##     b = -6.7983 
##     s=1.1316 1.0399 0.8877 0.9505 1.2722 1.3862
##            1.1463 1.1097 0.9345 0.8513 0.6996 0.5903
## 
##   sigma:  0.0859
## 
##      AIC     AICc      BIC 
## 2755.038 2759.118 2808.145
## [1] 1217.250 1435.458

c). Create a plot for the residuals from the Holt-Winter’s exponential smoothing.

Based on this plot, which of the following statements are reasonable?

How well can you handle the above effect with exponential smoothing

By using Holts-Winter exponential smoothing it does capture some seasonality however it seems that though there could be more than one seasonal pattern. There is clearly room for improvement in forecasting when using the above model.