Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

Lesson 2: Exponential Smoothing Models

2.1 Exponential Smoothing Models

Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Objectives
• Explore weighted average models and exponential smoothing.
• Compare and contrast simple mean, random walk, and exponential
smoothing models.

2
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Weighted Average Examples
Sample Mean Random Walk

Weights Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8
Weights applied to past values to predict
Y9

3
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Weighted Average Example: Random Walk
n
Random Walk
Yˆn 1   wt Yt  Yn
t 1

wn  1, wt  0 for t  1,2, , n  1

A random walk forecast is a weighted average


where all weights are 0 except the most recent, Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8
which is 1.
Yˆ9  Y8

4
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Weighted Average Example: Simple Moving Average
n
Sample Mean
Yˆn 1   wtYt  w1Y1  w2Y2    wnYn
Weights t 1

1 1 n n
  Yt   Yt  Y
t 1 n n t 1
1
Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 wt 
n
The mean is a weighted average
1 8
Yˆ9   Yt where all weights are the same.
8 t 1

5
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Simple Moving Average
Disadvantages of a Simple Moving Average
• It cannot be used on the first n-1 terms of the time series without adding
other terms by some other means.
• It can be influenced by extreme values within the window.
• It requires the retaining of the most recent n observations to produce
a forecasted value.

6
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Weighted Average Example: Weighted Moving Average
n
Yˆn 1   wtYt  w1Y1  w2Y2    wnYn
t 1
n

Weights w
t 1
t 1

The mean is a weighted


average where not all
Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 weights are the same.

7
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
More about Weighted Moving Average
• More weight is given to the most recent terms in the time series and less
to the older terms.
• Like the simple moving average, a weighted moving average cannot be used
until at least n observations are made.
• Several methods exist for handling missing data.
• A weighted moving average requires retaining the most recent n
observations to produce a forecasted value.

8
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Exponential Smoothing Models: Premise
• Weighted averages of past values can produce good forecasts of the
future.
• The weights should emphasize the most recent data.
• Forecasting should require only a few parameters.
• Forecast equations should be simple and easy to implement.

9
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
The Exponential Smoothing Coefficient
Forecast Equation
Yˆt 1  Yt  (1   )Yˆt
 Yt  (1   )[Yt 1  (1   )Yˆt 1 ]
 Y   (1   )Y  (1   ) 2 Yˆ
t t 1 t 1

 Yt   (1   )Yt 1  (1   ) 2 [Yt  2  (1   )Yˆt  2 ]


 Yt   (1   )Yt 1   (1   ) 2 Yt  2   (1   ) 3 Yt 3  

10
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Simple Exponential Smoothing
  0.5   0.25

Weights
Y3 Y4 Y5 Y6 Y7 Y8 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8

Weights applied to past values to predict Y9

As the parameter increases, the emphasis


on the most recent values increases.

11
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Exponential Smoothing for Seasonal Data

Weights

Jan00 Jan01 Jan02 Jan03 Jan04 Feb00 Feb01 Feb02 Feb03 Feb04

Weights decay with respect to the seasonal factor.

12
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Exponential Smoothing Models (ESM)
• Models for time series with trend:
• simple exponential smoothing
• double (Brown) exponential smoothing
• linear (Holt) exponential smoothing
• damped-trend exponential smoothing
• Models for time series with seasonality:
• seasonal exponential smoothing
• Models for time series with trend and seasonality:
• Winters additive exponential smoothing
• Winters multiplicative exponential smoothing

13
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM Parameters and Keywords
ESM Parameters Model=Keyword
Simple  SIMPLE
Double  DOUBLE
Linear (Holt) ,  LINEAR
Damped-Trend , ,  DAMPTREND
Seasonal ,  SEASONAL
Additive Winters , ,  ADDWINTERS
Multiplicative , ,  WINTERS
Winters

14
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM ODS Output

16
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM ODS Output

17
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM ODS Output

18
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM ODS Output

19
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
ESM ODS Output

20
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
PROC ESM Syntax
PROC ESM DATA=SAS-data-set OUT=SAS-data-set
OUTEST=SAS-data-set
OUTFOR=SAS-data-set
OUTSTAT=SAS-data-set
OUTSUM=SAS-data-set
SEASONALITY=n
PLOT=option|(options)
PRINT=option|(options)
LEAD=n
<options>;
BY variables;
ID variable INTERVAL=interval;
FORECAST variables / MODEL=model <options>;
RUN;
21
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Modeling and Forecasting Task: SAS Studio

22
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Questions?

23
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Sea Surface Temperatures (SST)

24
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Analyzing Sea Surface
Temperatures Using SAS Studio
This demonstration illustrates exponential smoothing
using tasks in SAS Studio.

25
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Questions?

26
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
2.01 Multiple Answer Question
Which of the following plots can assist in determining that there are
components that are capable of being modeled for the time series?
a. white noise probability
b. trend component
c. seasonal component

27
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
2.01 Multiple Answer Question – Correct Answers
Which of the following plots can assist in determining that there are
components that are capable of being modeled for the time series?
a. white noise probability
b. trend component
c. seasonal component

28
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Practice
This exercise reinforces the concepts
discussed previously.

29
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.
Time Series Imputation
Using PROC ESM (Self-Study)
This demonstration illustrates how to use exponential
smoothing models for imputing missing values of a time
series.

30
Co py r i gh t © SA S I ns ti t u t e I n c. Al l r i g h ts re se r v e d.

You might also like