The HPFENGINE Procedure

Getting Started: HPFENGINE Procedure

(View the complete code for this example.)

In its simplest usage, the HPFENGINE procedure produces results similar to those of the HPF procedure:

proc hpfengine data=sashelp.air
               print=(select summary);
   id date interval=month;
   forecast air;
run;

The GLOBALSELECTION= and REPOSITORY= options assume their respective default values. Therefore automatic selection is performed for the AIR series in SASHELP.AIR by using the models specified in the BEST selection list. The selection list BEST is found, together with the smoothing models it references, in SASHELP.HPFDFLT.

The results of the automatic model selection are displayed in Figure 1. A summary of the forecast is shown in Figure 2.

Figure 1: Selection Results

The HPFENGINE Procedure

Model Selection Criterion = RMSE
ModelStatisticSelectedLabel
SMSIMP.RemovedSimple Exponential Smoothing
SMDAMP.RemovedDamped-Trend Exponential Smoothing
SMLIN.RemovedLinear Exponential Smoothing
SMADWN12.245596NoWinters Method (Additive)
SMWINT10.579085YesWinters Method (Multiplicative)
SMSEAS14.169905NoSeasonal Exponential Smoothing


Figure 2: Forecast Summary

Forecast Summary
VariableValueJAN1961FEB1961MAR1961APR1961MAY1961JUN1961JUL1961AUG1961SEP1961OCT1961NOV1961DEC1961
AIRPredicted445.2972418.1426464.0889494.0261504.9584572.5947662.7040653.7742545.8935487.7147415.2594459.6067


The first four models in the selection list are nonseasonal smoothing models. The HPFENGINE procedure determined that the series AIR in SASHELP.AIR was seasonal and attempted to fit only seasonal models.

The multiplicative Winters method produced a fit with the smallest root mean squared error (RMSE).

As another example, consider the problem of comparing the performance of multiple ARIMA models for a particular series. This is done by using the HPFARIMASPEC procedure as follows to specify the models.

proc hpfarimaspec repository=sasuser.repository
                  name=arima1;
   dependent symbol=air q=1
             diflist=(1 12) noint transform=log;
run;

proc hpfarimaspec repository=sasuser.repository
                  name=arima2;
   dependent symbol=air q=(1,12)
             diflist=(1 12) noint transform=log;
run;

The model specifications are grouped together in a selection list. Selection lists are built with the HPFSELECT procedure.

proc hpfselect repository=sasuser.repository
               name=myselect;
   spec arima1 arima2;
run;

The HPFENGINE procedure uses the GLOBALSELECTION= option to reference the selection list that contains the two ARIMA models. Selection /results are shown in Figure 3, and the forecast plot is shown in Figure 4.

proc hpfengine data=sashelp.air
               repository=sasuser.repository
               globalselection=myselect
               print=(select forecasts)
               plot=forecasts;
   id date interval=month;
   forecast air;
run;

Figure 3: Selection and Forecast Results

The HPFENGINE Procedure

Model Selection Criterion = MAPE
ModelStatisticSelectedLabel
ARIMA13.2553815NoARIMA: Log( AIR ) ~ D = (1,12) Q = 1 NOINT
ARIMA22.9672282YesARIMA: Log( AIR ) ~ D = (1,12) Q = (1,12) NOINT


Figure 4: Forecasts

Forecasts


Last updated: July 31, 2025