The CESM Procedure

FORECAST Statement

  • FORECAST variable-list / <options>;

The FORECAST statement lists the numeric variables in the input data table whose accumulated values represent time series to be modeled and forecast. (The input data table is specified in the DATA= option in the PROC CESM statement.)

You must specify a variable-list that contains one or more numeric variables. For more information about the variable-list, see the section "SAS Variable Lists" in SAS Programmers Guide: Essentials.

You can specify any number of FORECAST statements, but you cannot specify the same variable in more than one of them.

You can specify the following options to specify which forecast model to use:

ACCUMULATE=option

specifies how to accumulate the data table observations within each time period for the variables in the variable-list. If the ACCUMULATE= option is not specified in the FORECAST statement, accumulation is determined by the ACCUMULATE= option in the ID statement. Use the ACCUMULATE= option with multiple FORECAST statements when you want different accumulation specifications for different variables. For more information, see the ACCUMULATE= option in the ID statement.

ALPHA=number

specifies the significance level to use in computing the confidence limits of the forecast, where number must be between 0 and 1. By default, ALPHA=0.05, which produces 95% confidence intervals.

BACK=n

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

CRITERION=criterion

specifies the model selection criterion (statistic of fit) to use to select from several candidate models. The default is CRITERION=RMSE. The following statistics of fit are provided:

SSE

sum of square error

MSE

mean squared error

RMSE

root mean squared error

UMSE

unbiased mean squared error

URMSE

unbiased root mean squared error

MAXPE

maximum percent error

MINPE

minimum percent error

MPE

mean percent error

MAPE

mean absolute percent error

MDAPE

median percent error

GMAPE

geometric mean percent error

MAPES

mean absolute error percent of standard deviation

MDAPES

median absolute error percent of standard deviation

GMAPES

geometric mean absolute error percent of standard deviation

MINPPE

minimum predictive percent error

MAXPPE

maximum predictive percent error

MPPE

mean predictive percent error

MAPPE

symmetric mean absolute predictive percent error

MDAPPE

median predictive percent error

GMAPPE

geometric mean predictive percent error

MINSPE

minimum symmetric percent error

MAXSPE

maximum symmetric percent error

MSPE

mean symmetric percent error

SMAPE

symmetric mean absolute percent error

MDASPE

median symmetric percent error

GMASPE

geometric mean symmetric percent error

MINRE

minimum relative error

MAXRE

maximum relative error

MRE

mean relative error

MRAE

mean relative absolute error

MDRAE

median relative absolute error

GMRAE

geometric mean relative absolute error

MAXERR

maximum error

MINERR

minimum error

ME

mean error

MAE

mean absolute error

MASE

mean absolute scaled error

RSQUARE

R-square

ADJRSQ

adjusted R-square

AADJRSQ

Amemiya’s adjusted R-square

RWRSQ

random walk R-square

AIC

Akaike information criterion

AICC

Akaike information corrected criterion

SBC

Schwarz Bayesian information criterion

APC

Amemiya’s prediction criterion

LEAD=n

specifies the number of periods ahead to forecast (the forecast lead or horizon).

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

By default, LEAD=0.

MEDIAN

estimates the median forecast values and uses those values for forecasting. (By default, PROC CESM uses mean values for forecasting.) If you do not specify the TRANSFORM= option, no transformation is applied to the time series, so the mean and median forecast values are identical.

METHOD=model-name

specifies the forecasting model to use to forecast the time series. You can specify the following forecasting model-names:

ADDWINTERS

requests the Winters additive method.

BEST

requests the best candidate smoothing model among the SIMPLE, LINEAR, DAMPTREND, SEASONAL, ADDWINTERS, or WINTERS methods.

BESTN

requests the best candidate nonseasonal smoothing model among the SIMPLE, LINEAR, or DAMPTREND methods.

BESTS

requests the best candidate seasonal smoothing model among the SEASONAL, ADDWINTERS, or WINTERS methods.

DAMPTREND

requests damped trend exponential smoothing.

DOUBLE

requests second-order exponential smoothing.

LINEAR

requests linear (Holt) exponential smoothing.

MULTSEASONAL

requests multiplicative seasonal exponential smoothing.

SEASONAL

requests additive seasonal exponential smoothing.

SIMPLE

requests simple (single) exponential smoothing.

WINTERS

requests Winters multiplicative method.

By default, METHOD=BEST.

SETMISSING=option | number

specifies how to assign missing values (either input or accumulated) in the accumulated time series for variables in the variable-list. If the SETMISSING= option is not specified in the FORECAST statement, missing values are set according to the value of the SETMISSING= option in the ID statement. For more information, see the SETMISSING= option in the ID statement.

TRANSFORM=option

specifies the time series transformation to be applied to the input or accumulated time series. You can specify the following values for option:

AUTO

automatically chooses between NONE and LOG on the basis of the model selection criteria.

BOXCOX(n)

performs Box-Cox transformation with parameter number (n), where n must be between –5 and 5.

LOG

performs logarithmic transformation.

LOGISTIC

performs logistic transformation.

NONE

performs no transformation.

SQRT

performs square-root transformation.

By default, TRANSFORM=NONE.

When the TRANSFORM= option is specified, the time series must be strictly positive. After the time series is transformed, the model parameters are estimated by using the transformed series. The forecasts of the transformed series are then computed, and finally the transformed series forecasts are inverse-transformed. The inverse transform produces either mean or median forecasts depending on whether the MEDIAN option is specified. For more information, see the sections Transformations and Inverse Transformations.

Last updated: October 12, 2022