Sentry Page Protection
Time Series Modeling
[14-15]
[14-15]
The ESM procedure is another tool in SAS that allows you to perform quick forecasting using exponential smoothing.
If you haven't created the TS2 data set, copy and run the code from the yellow box below:
Simple Exponential Smoothing
The Simple Exponential Smoothing (SES) model is equivalent to the ARIMA (0 1 1) model with no constant.
You can easily fit a SES model using the ESM procedure.
Example
proc esm data=ts2
back=14 lead=14
plot=(corr errors modelforecasts)
print=all;
forecast x / model=simple;
run;
back=14 lead=14
plot=(corr errors modelforecasts)
print=all;
forecast x / model=simple;
run;
The FORECAST statement in the ESM procedure tells SAS to perform forecasting.
The MODEL=SIMPLE simply specifies the model being the simple exponential smoothing.
The code above generates a number of tables and plots which includes:
The Descriptive Statistics Table
The Parameter Estimates Table
The Standard ACF and PACF Plots for Prediction Error
The Forecasting Plot for X
There are a number of additional models that can be fitted using the ESM procedure:
- Simple Exponential Smoothing (model=simple)
- Double Exponential Smoothing (model=double)
- Linear (Holt) Exponential Smoothing (model=linear)
- Damped Trend Exponential Smoothing (model=damptrend)
- Additive Seasonal Exponential Smoothing (model=seasonal)
- Multiplicative Seasonal Exponential Smoothing (model=addseasonal)
- Winters Multiplicative Method (model=winters)
- Winters Additive Method (model=addwinters)
Let's look at another example.
Linear (Holt) Exponential Smoothing
We are going to fit the Linear Exponential Smoothing model to the data.
proc esm data=ts2
back=14 lead=14
plot=(corr errors modelforecasts)
print=all;
forecast x / model=linear;
run;
back=14 lead=14
plot=(corr errors modelforecasts)
print=all;
forecast x / model=linear;
run;
Below is the forecasting plot from the Linear Exponential Smoothing model:
In the next (final) section, we will go back to the SALES data set from the very beginning, build an ARIMA model, and forecast the daily sales using 3-week forecasting periods.
Exercise
Perform damped trend exponential smoothing on the TS2 data set.
Perform damped trend exponential smoothing on the TS2 data set.
Need some help?
Fill out my online form.