The HPF Procedure

IDM Statement

  • IDM options;

The IDM statement specifies an intermittent demand model. An intermittent demand series can be analyzed in two ways: individually modeling both demand interval and size component or jointly modeling these components by using the average demand component (demand size divided by demand interval). The IDM statement specifies the two smoothing models to be used to forecast the demand interval component (INTERVAL= option) and the demand size component (SIZE= option) or specifies the single smoothing model to be used to forecast the average demand component (AVERAGE= option). Therefore, two smoothing models (INTERVAL= and SIZE= options) must be specified or one smoothing model (AVERAGE= option) must be specified. Only one statement can be specified.

The following examples illustrate typical uses of the IDM statement:

/* default specification */
idm;

/* demand interval model only specification */
idm interval=(transform=log);

/* demand size model only specification */
idm size=(method=linear);

/* Croston's Method */
idm interval=(method=simple)
    size    =(method=simple);
/* Log Croston's Method */
idm interval=(method=simple transform=log)
    size    =(method=simple transform=log);

/* average demand model specification */
idm average=(method=bestn);

The default specification uses both the INTERVAL= option and SIZE= option defaults for the decomposed (Croston’s) demand model and the AVERAGE= option defaults for the average demand model.

The following example illustrates how to automatically choose the decomposed demand model by using MAPE as the model selection criterion:

idm interval=( method=simple transform=auto criterion=mape )
    size    =( method=simple transform=auto criterion=mape );
forecast sales / model=idm criterion=mape;

The preceding statements fit two forecast models (simple and log simple exponential smoothing) to both the demand interval and size components. The forecast model that results in the lowest in-sample MAPE for each component is used to forecast the component.

The following example illustrates how to automatically choose the average demand model by using MAPE as the model selection criterion:

idm average=(method=simple transform=auto criterion=mape);
forecast sales / model=idm;

The preceding statements fit two forecast models (simple and log simple exponential smoothing) to the average demand component. The forecast model that results in the lowest in-sample MAPE is used to forecast the component.

Combining the two preceding examples, the following example illustrates how to automatically choose between the decomposed demand model and the average demand model by using MAPE as the model selection criterion:

idm interval=(method=simple transform=auto criterion=mape)
    size    =(method=simple transform=auto criterion=mape)
    average =(method=simple transform=auto criterion=mape);
forecast sales / model=idm criterion=mape;

The preceding statements automatically select between the decomposed demand model and the average demand model as described previously. The forecast model that results in the lowest in-sample MAPE is used to forecast the series.

The following options can be specified in the IDM statement:

AVERAGE=(smoothing-model-options)

specifies the smoothing model used to forecast the demand average component. See the section Smoothing Model Specification Options for IDM Statement.

BASE=AUTO | number

specifies the base value of the time series used to determine the demand series components. The demand series components are determined based on the departures from this base value. If a base value is specified, this value is used to determine the demand series components. If BASE=AUTO is specified, the time series properties are used to automatically adjust the time series. For the common definition of Croston’s method use BASE=0 which defines departures based on zero. The default is BASE=0.

Given a time series y Subscript t and base value b, the time series is adjusted by the base value to create the base adjusted time series, x Subscript t Baseline equals y Subscript t Baseline minus b. Demands are assumed to occur when the base adjusted series is nonzero (or when the time series y Subscript t departs from the base value b).

When BASE=AUTO, the base value is automatically determined by the time series median, minimum and maximum values, and the INTERMITTENT= option value of the FORECAST statement.

INTERVAL=(smoothing-model-options)

specifies the smoothing model used to forecast the demand interval component. See the section Smoothing Model Specification Options for IDM Statement.

SIZE=(smoothing-model-options)

specifies the smoothing model used to forecast the demand size component. See the section Smoothing Model Specification Options for IDM Statement.

Last updated: March 05, 2026