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

The HPFENGINE Procedure

Model Selection Criterion = RMSE
ModelStatisticSelectedLabel
SMSIMP.RemovedSimple Exponential Smoothing
SMDAMP.RemovedDamped-Trend Exponential Smoothing
SMLIN.RemovedLinear Exponential Smoothing
SMADWN0.16293237NoWinters Method (Additive)
SMWINT0.17985708NoWinters Method (Multiplicative)
SMSEAS0.16291415YesSeasonal 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

The HPFENGINE Procedure

Model Selection Criterion = MAPE
ModelStatisticSelectedLabel
SMSIMP.RemovedSimple Exponential Smoothing
SMDAMP.RemovedDamped-Trend Exponential Smoothing
SMLIN.RemovedLinear Exponential Smoothing
SMADWN2.2881620YesWinters Method (Additive)
SMWINT2.9441207NoWinters Method (Multiplicative)
SMSEAS2.5775447NoSeasonal 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

Forecasts


Last updated: March 05, 2026