The HPFENGINE Procedure
Example 5.1 The TASK= Option
(View the complete code for this example.)
The default selection list is used in this example. The first call to the HPFENGINE procedure, which follows, uses the default TASK=SELECT option. A model is selected from the default list, parameters are estimated, and a forecast is produced. Selection results are shown in Output 5.1.1.
proc hpfengine data=sashelp.citimon
outfor=outfor
print=select;
id date interval=month;
forecast eec;
run;
Output 5.1.1: Selection and Forecast Results
| Model Selection Criterion = RMSE | |||
|---|---|---|---|
| Model | Statistic | Selected | Label |
| SMSIMP | . | Removed | Simple Exponential Smoothing |
| SMDAMP | . | Removed | Damped-Trend Exponential Smoothing |
| SMLIN | . | Removed | Linear Exponential Smoothing |
| SMADWN | 0.16293237 | No | Winters Method (Additive) |
| SMWINT | 0.17985708 | No | Winters Method (Multiplicative) |
| SMSEAS | 0.16291415 | Yes | Seasonal Exponential Smoothing |
The second call to the HPFENGINE procedure follows. It demonstrates how to use the same model specifications but alter the selection criterion and add a holdout. It is not necessary to create a new selection list to make these changes, since the TASK=SELECT option can override the settings in an existing list. Selection results are shown in Output 5.1.2.
proc hpfengine data=sashelp.citimon
outfor=outfor
outest=outest
print=select
task=select(criterion=mape holdout=24 override);
id date interval=month;
forecast eec;
run;
Output 5.1.2: Selection and Forecast Results
| Model Selection Criterion = MAPE | |||
|---|---|---|---|
| Model | Statistic | Selected | Label |
| SMSIMP | . | Removed | Simple Exponential Smoothing |
| SMDAMP | . | Removed | Damped-Trend Exponential Smoothing |
| SMLIN | . | Removed | Linear Exponential Smoothing |
| SMADWN | 2.2881620 | Yes | Winters Method (Additive) |
| SMWINT | 2.9441207 | No | Winters Method (Multiplicative) |
| SMSEAS | 2.5775447 | No | Seasonal Exponential Smoothing |
Perhaps there are revisions to recent historical data and there is a need to forecast using the updated information but with the same model used to forecast earlier data. This is done easily with the TASK=UPDATE option. The following DATA step is used to simulate revision to the data.
data citimon;
set sashelp.citimon;
if date ge '01JAN1991'd then eec = eec + 0.1;
run;
In the following statements, the HPFENGINE procedure is called with TASK=UPDATE. The additional instruction to change the confidence interval to 90%. The forecast model is the same as was used in the previous call of the HPFENGINE procedure. A reference to this model, together with estimates of its parameters, is found in the OUTEST= data set. The parameters are estimated again using the full range of data, and the prior parameter estimates are used as starting points in the optimization of the new estimates.
proc hpfengine data=citimon
outfor=outfor
inest=outest
plot=forecasts
lead=24
task=update(alpha=.1 override);
id date interval=month;
forecast eec;
run;
Output 5.1.3 shows the forecast plot from the PLOT=FORECASTS option.
Output 5.1.3: Forecasts
