The ESM Procedure

PROC ESM Statement

PROC ESM options ;

The following options can be used in the PROC ESM statement.


specifies the number of observations before the end of the data where the multistep forecasts are to begin. The default is BACK=0.


names the SAS data set that contains the input data for the procedure to forecast. If the DATA= option is not specified, the most recently created SAS data set is used.


specifies the number of periods ahead to forecast (forecast lead or horizon). The default is LEAD=12.

The LEAD= value is relative to the BACK= option specification and to the last observation in the input data set or the accumulated series, and not to the last nonmissing observation of a particular series. Thus, if a series has missing values at the end, the actual number of forecasts computed for that series is greater than the LEAD= value.


limits the number of warning and error messages produced during the execution of the procedure to the specified value. The default is MAXERRORS=50. This option is particularly useful in BY-group processing where it can be used to suppress the recurring messages.


specifies that only forecasts are written to the OUT= and OUTFOR= data sets. The NOOUTALL option includes only the final forecast observations in the output data sets; it does not include the one-step forecasts for the data before the forecast period.

The OUT= and OUTFOR= data set will only contain the forecast results starting at the next period following the last observation and ending with the forecast horizon specified by the LEAD= option.


names the output data set to contain the forecasts of the variables specified in the subsequent FORECAST statements. If an ID variable is specified, it is also included in the OUT= data set. The values are accumulated based on the ACCUMULATE= option, and forecasts are appended to these values based on the FORECAST statement USE= option. The OUT= data set is particularly useful in extending the independent variables. The OUT= data set can be used as the input data set in a subsequent PROC step to forecast a dependent series by using a regression modeling procedure. If the OUT= option is not specified, a default output data set is created by using the DATAn convention. If you do not want the OUT= data set created, use OUT=_NULL_.


names the output data set to contain the model parameter estimates and the associated test statistics and probability values. The OUTEST= data set is useful for evaluating the significance of the model parameters and understanding the model dynamics.


names the output data set to contain the forecast time series components (actual, predicted, lower confidence limit, upper confidence limit, prediction error, prediction standard error). The OUTFOR= data set is useful for displaying the forecasts in tabular or graphical form.


names the output data set to contain information in the SAS log, specifically the number of notes, errors, and warnings and the number of series processed, forecasts requested, and forecasts failed.


names the output data set to contain the statistics of fit (or goodness-of-fit statistics). The OUTSTAT= data set is useful for evaluating how well the model fits the series.


names the output data set to contain the summary statistics and the forecast summation. The summary statistics are based on the accumulated time series when the ACCUMULATE= or SETMISSING= options are specified. The forecast summations are based on the LEAD=, STARTSUM=, and USE= options. The OUTSUM= data set is useful when forecasting large numbers of series and a summary of the results are needed.

PLOT=option | ( options )

specifies the graphical output desired. By default, the ESM procedure produces no graphical output. The following plotting options are available:


plots prediction error autocorrelation function graphics.


is the same as specifying all of the PLOT= options.


equivalent to specifying PLOT=(CORR ERRORS MODELFORECASTS).


plots the prediction error series graphics panel containing the ACF, IACF, PACF, and white noise probability plots.


plots prediction error time series graphics.


plots forecast graphics.


plots the forecast in the forecast horizon only.


plots prediction error inverse autocorrelation function graphics.


plots smoothed level component graphics.


plots the one-step ahead model forecast and its confidence bands in the historical period; the forecast and its confidence bands over the forecast horizon.


plots model graphics.


plots prediction error partial autocorrelation function graphics.


plots prediction error periodogram.


plots smoothed seasonal component graphics.


plots periodogram and smoothed periodogram of the prediction error series in a single graph.


plots smoothed trend (slope) component graphics.


plots white noise graphics.

For example, PLOT=FORECASTS plots the forecasts for each series. The PLOT= option produces printed output for these results by using the Output Delivery System (ODS).

PRINT=option | ( options )

specifies the printed output desired. By default, the ESM procedure produces no printed output. The following printing options are available:


prints the results of parameter estimation.


prints the forecasts.


prints the performance statistics for each forecast.


prints the performance summary for each BY group.


prints the performance summary for all of the BY groups.


prints the statistics of fit.


prints the backcast, initial, and final states.


prints the summary statistics for the accumulated time series.



For example, PRINT=FORECASTS prints the forecasts, PRINT=(ESTIMATES FORECASTS) prints the parameter estimates and the forecasts, and PRINT=ALL prints all of the output.


specifies that output requested with the PRINT= option be printed in greater detail.


specifies the length of the seasonal cycle. For example, SEASONALITY=3 means that every group of three observations forms a seasonal cycle. The SEASONALITY= option is applicable only for seasonal forecasting models. By default, the length of the seasonal cycle is one (no seasonality) or the length implied by the INTERVAL= option specified in the ID statement. For example, INTERVAL=MONTH implies that the length of the seasonal cycle is twelve.


specifies that the variables specified in the FORECAST statements are processed in sorted order.


specifies the starting forecast lead (or horizon) for which to begin summation of the forecasts specified by the LEAD= option. The STARTSUM= value must be less than the LEAD= value. The default is STARTSUM=1; that is, the sum from the one-step ahead forecast (which is the first forecast in the forecast horizon) to the multistep forecast specified by the LEAD= option.

The prediction standard errors of the summation of forecasts take into account the correlation between the multistep forecasts. The section Forecast Summation describes the STARTSUM= option in more detail.