Implement the Holt-Winter method to forecast time series
Explain the Holt-Winters method equations for multiplicative decomposition models
Explain the purpose of the paramters \(\alpha\), \(\beta\), and \(\gamma\)
Interpret the coefficient estimates \(a_t\), \(b_t\), and \(s_t\) of the Holt-Winters smoothing algorithm
Explain the Holt-Winters forecasting equation for multiplicative decomposition models, Equation (3.23)
Use HoltWinters() to forecast multiplicative model time series
Plot the Holt-Winters decomposition of a TS (see Fig 3.10)
Plot the Holt-Winters fitted values versus the original time series (see Fig 3.11)
Superimpose plots of the Holt-Winters predictions with the time series realizations (see Fig 3.13)
Preparation
Read Sections 3.4.2-3.4.3, 3.5
Learning Journal Exchange (10 min)
Review another student’s journal
What would you add to your learning journal after reading another student’s?
What would you recommend the other student add to their learning journal?
Sign the Learning Journal review sheet for your peer
Class Discussion: Multiplicative Seasonality (10 min)
We can assume either additive or multiplicative seasonality. In the previous two lessons, we explored additive seasonality. In this lesson, we consider the case where the seasonality is multiplicative.
Additive seasonality is appropriate when the variation in the time series is roughly constant for any level. We assume multiplicative seasonality when the variation gets larger as the level increases.
Forecasting
Here are the forecasting equations we use, based on the model that is appropriate for the time series.
With your partner, for the forecasting equations above, identify where the additive or multiplicative terms are represented for both the slope and the seasonality.
How is an additive slope represented in the forecasting equation?
How is additive seasonality represented in the forecasting equation?
How is multiplicative seasonality represented in the forecasting equation?
Note that when the seasonal effect is additive, we subtract it from the time series to remove its effect. If the seasonal effect is multiplicative, we divide.
Check Your Understanding
Work with your partner to answer the following questions about the update equations.
Explain why this expression for \(s_t\) estimates the seasonal component of the time series at time \(t\).
When the seasonal component appears on the right-hand side of the update equations, it always given as \(s_{t-p}\). Why do we use the estimate of the seasonal effect \(p\) periods ago? Why not apply a more recent value?
What do the following sets of terms have in common?
\(\{A, C, E \}\)
\(\{B, D, F \}\)
Explain why the Holt-Winters method for multiplicative seasonals works.
Small Group Activity: Holt-Winters Model for BYU-Idaho Enrollment Data (25 min)
We will now apply Holt-Winters filtering to the BYU-Idaho Enrollment data. First, we examine the time plot in Figure 1.
We can compute some values to assess the fit of the model:
Show the code
# SS of random termssum(components(apple_hw)$remainder^2, na.rm = T)# RMSEforecast::accuracy(apple_hw)$RMSE# Standard devation of the quarterly revenuessd(apple_ts$revenue)
The sum of the square of the random terms is: 2235.1651229.
The root mean square error (RMSE) is: 5.423105.
The standard deviation of the number of incidents each month is 33.0205.
Figure 2 illustrates the Holt-Winters decomposition of the Apple revenue data.
Show the code
autoplot(components(apple_hw))
In Figure 3, we can observe the relationship between the Holt-Winters filter and the Apple revenue time series.
Show the code
augment(apple_hw) |>ggplot(aes(x = index, y = revenue)) +geom_line() +geom_line(aes(y = .fitted, color ="Fitted")) +labs(color ="")
Figure 4 contains the information from Figure 3, with the addition of an additional four years of forecasted values. The light blue bands give a 95% prediction bands for the forecast.
Table 1: Holt-Winters smoothing for BYU-Idaho campus enrollments
$$Semester$$
$$t$$
$$x_t$$
$$a_t$$
$$b_t$$
$$s_t$$
$$\hat x_t$$
SP11
-2
—
—
—
1
—
FA11
-1
—
—
—
1
—
WI12
0
—
—
—
1
—
SP12
1
13.7
13.7
-0.022
1
13.7
FA12
2
16.2
14.2
0.082
1.03
14.6
WI13
3
15.5
14.5
0.126
1.01
14.6
SP13
4
14
14.5
0.101
0.99
14.4
FA13
5
15.6
14.7
0.121
1.04
15.3
WI14
6
15.6
14.9
0.137
1.02
15.2
SP14
7
12.9
14.6
0.05
0.97
14.2
FA14
8
16.2
14.8
0.08
1.05
15.5
WI15
9
16.7
15.2
0.144
1.04
15.8
SP15
10
13.7
15.1
0.095
0.96
14.5
FA15
11
17.6
15.5
0.156
1.07
16.6
⋮
⋮
⋮
⋮
⋮
⋮
⋮
FA22
32
19.4
17.7
-0.086
1.12
19.8
WI23
33
17.7
17.5
-0.109
1.04
18.2
SP23
34
12.8
16.9
-0.207
0.85
14.4
FA23
35
18.7
16.7
-0.206
1.12
18.7
WI24
36
17.6
16.6
-0.185
1.04
17.3
SP24
37
—
—
—
0.85
14
FA24
38
—
—
—
1.12
18.2
WI25
39
—
—
—
1.04
16.7
SP25
40
—
—
—
0.85
13.5
FA25
41
—
—
—
1.12
17.6
WI26
42
—
—
—
1.04
16.1
SP26
43
—
—
—
0.85
13
FA26
44
—
—
—
1.12
16.9
WI27
45
—
—
—
1.04
15.5
References
C. C. Holt (1957) Forecasting seasonals and trends by exponentially weighted moving averages, ONR Research Memorandum, Carnegie Institute of Technology 52. (Reprint at https://doi.org/10.1016/j.ijforecast.2003.09.015).
P. R. Winters (1960). Forecasting sales by exponentially weighted moving averages. Management Science, 6, 324–342. (Reprint at https://doi.org/10.1287/mnsc.6.3.324.)