Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The FORECAST Procedure

PROC FORECAST Statement

PROC FORECAST options;
The following options can be specified in the PROC FORECAST statement:

ALIGN= option
controls the alignment of SAS dates used to identify output observations. The ALIGN= option allows the following values: BEGINNING|BEG|B, MIDDLE|MID|M, and ENDING|END|E. BEGINNING is the default.

ALPHA= value
specifies the significance level to use in computing the confidence limits of the forecast. The value of the ALPHA= option must be between .01 and .99. You should use only two digits for the ALPHA= option because PROC FORECAST rounds the value to the nearest percent (ALPHA=.101 is the same as ALPHA=.10). The default is ALPHA=.05, which produces 95% confidence limits.

AR= n
NLAGS= n
specifies the maximum order of the autoregressive model. The AR= option is only valid for METHOD=STEPAR. The default value of n depends on the INTERVAL= option and on the number of observations in the DATA= data set. See "STEPAR Method" later in this chapter for details.

ASTART= value
ASTART= ( value ... )
specifies starting values for the constant term for the exponential smoothing, Winters, and additive Winters methods. This option is ignored if METHOD=STEPAR. See "Starting Values for EXPO, WINTERS, and ADDWINTERS Methods" later in this chapter for details.

BSTART= value
BSTART= ( value ... )
specifies starting values for the linear trend for the exponential smoothing, Winters, and additive Winters methods. This option is ignored if METHOD=STEPAR or TREND=1. See "Starting Values for EXPO, WINTERS, and ADDWINTERS Methods" later in this chapter for details.

CSTART= value
CSTART= ( value ... )
specifies starting values for the quadratic trend for the exponential smoothing, Winters, and additive Winters methods. This option is ignored if METHOD=STEPAR or TREND=1 or 2. See "Starting Values for EXPO, WINTERS, and ADDWINTERS Methods" later in this chapter for details.

DATA= SAS-data-set
names the SAS data set containing the input time series for the procedure to forecast. If the DATA= option is not specified, the most recently created SAS data set is used.

INTERVAL= interval
specifies the frequency of the input time series. For example, if the input data set consists of quarterly observations, then INTERVAL=QTR should be used. See Chapter 3, "Date Intervals, Formats, and Functions," for more details on the intervals available.

INTPER= n
when the INTERVAL= option is not used, INTPER= specifies an increment (other than 1) to use in generating the values of the ID variable for the forecast observations in the output data set.

LEAD= n
specifies the number of periods ahead to forecast. The default is LEAD=12.

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

METHOD= method-name
specifies the method to use to model the series and generate the forecasts.
METHOD=STEPAR
specifies the stepwise autoregressive method.
METHOD=EXPO
specifies the exponential smoothing method.
METHOD=WINTERS
specifies the Holt-Winters exponentially smoothed trend-seasonal method.
METHOD=ADDWINTERS
specifies the additive seasonal factors variant of the Winters method.
For more information, see the section "Forecasting Methods" later in this chapter. The default is METHOD=STEPAR.

NSTART= n
NSTART= MAX
specifies the number of beginning values of the series to use in calculating starting values for the trend parameters in the exponential smoothing, Winters, and additive Winters methods. This option is ignored if METHOD=STEPAR.

For METHOD=EXPO, n beginning values of the series are used in forming the exponentially smoothed values S1, S2, and S3, where n is the value of the NSTART= option. The parameters are initialized by fitting a time trend regression to the first n nonmissing values of the series.

For METHOD=WINTERS or METHOD=ADDWINTERS, n beginning complete seasonal cycles are used to compute starting values for the trend parameters. For example, for monthly data the seasonal cycle is one year, and NSTART=2 specifies that the first 24 observations at the beginning of each series are used for the time trend regression used to calculate starting values.

When NSTART=MAX is specified, all the observations are used. The default for METHOD=EXPO is NSTART=8; the default for METHOD=WINTERS or METHOD=ADDWINTERS is NSTART=2. See "Starting Values for EXPO, WINTERS, and ADDWINTERS Methods" later in this chapter for details.

NSSTART= n
NSSTART= MAX
specifies the number of beginning values of the series to use in calculating starting values for seasonal parameters for METHOD=WINTERS or METHOD=ADDWINTERS. The seasonal parameters are initialized by averaging over the first n values of the series for each season, where n is the value of the NSSTART= option. When NSSTART=MAX is specified, all the observations are used.

If NSTART= is specified, but NSSTART= is not, NSSTART= defaults to the value specified for NSTART=. If neither NSTART= nor NSSTART= is specified, then the default is NSSTART=2. This option is ignored if METHOD=STEPAR or METHOD=EXPO. See "Starting Values for EXPO, WINTERS, and ADDWINTERS Methods" later in this chapter for details.

OUT= SAS-data-set
names the output data set to contain the forecasts. If the OUT= option is not specified, the data set is named using the DATAn convention. See "OUT= Data Set" later in this chapter for details.

OUTACTUAL
writes the actual values to the OUT= data set.

OUTALL
provides all the output control options (OUTLIMIT, OUT1STEP, OUTACTUAL, OUTRESID, and OUTSTD).

OUTEST= SAS-data-set
names an output data set to contain the parameter estimates and goodness-of-fit statistics. When the OUTEST= option is not specified, the parameters and goodness-of-fit statistics are not stored. See "OUTEST= Data Set" later in this chapter for details.

OUTESTALL
writes additional statistics to the OUTEST= data set. This option is the same as specifying both OUTESTTHEIL and OUTFITSTATS.

OUTESTTHEIL
writes Theil forecast accuracy statistics to the OUTEST= data set.

OUTFITSTATS
writes various R2-type forecast accuracy statistics to the OUTEST= data set.

OUTFULL
provides OUTACTUAL, OUT1STEP, and OUTLIMIT output control options in addition to the forecast values.

OUTLIMIT
writes the forecast confidence limits to the OUT= data set.

OUTRESID
writes the residuals (when available) to the OUT= data set.

OUTSTD
writes the standard errors of the forecasts to the OUT= data set.

OUT1STEP
writes the one-step-ahead predicted values to the OUT= data set.

SEASONS= interval
SEASONS= ( interval1 [ interval2 [ interval3 ] ] )
SEASONS= n
SEASONS= ( n1 [ n2 [ n3 ] ] )
specifies the seasonality for seasonal models. The interval can be QTR, MONTH, DAY, or HOUR, or multiples of these (QTR2, MONTH2, MONTH3, MONTH4, MONTH6, HOUR2, HOUR3, HOUR4, HOUR6, HOUR8, HOUR12).

Alternatively, seasonality can be specified by giving the length of the seasonal cycles. For example, SEASONS=3 means that every group of three observations forms a seasonal cycle. The SEASONS= option is valid only for METHOD=WINTERS or METHOD=ADDWINTERS. See "Specifying Seasonality" later in this chapter for details.

SINGULAR= value
gives the criterion for judging singularity. The default depends on the precision of the computer that you run SAS programs on.

SINTPER= m
SINTPER= ( m1 [ m2 [ m3 ] ] )
specifies the number of periods to combine in forming a season. For example, SEASONS=3 SINTPER=2 specifies that each group of two observations forms a season and that the seasonal cycle repeats every six observations. The SINTPER= option is valid only when the SEASONS= option is used. See "Specifying Seasonality" later in this chapter for details.

SLENTRY= value
controls the significance levels for entry of autoregressive parameters in the STEPAR method. The value of the SLENTRY= option must be between 0 and 1. The default is SLENTRY=0.2. See "STEPAR Method" later in this chapter for details.

SLSTAY= value
controls the significance levels for removal of autoregressive parameters in the STEPAR method. The value of the SLSTAY= option must be between 0 and 1. The default is SLSTAY=0.05. See "STEPAR Method" later in this chapter for details.

START= n
uses the first n observations to fit the model and begins forecasting with the n+1 observation.

TREND= n
specifies the degree of the time trend model. The value of the TREND= option must be 1, 2, or 3. TREND=1 selects the constant trend model; TREND=2 selects the linear trend model; and TREND=3 selects the quadratic trend model. The default is TREND=2, except for METHOD=EXPO, for which the default is TREND=3.

WEIGHT= w
WEIGHT= ( w1 [ w2 [ w3 ] ] )
specifies the smoothing weights for the EXPO, WINTERS, and ADDWINTERS methods. For the EXPO method, only one weight can be specified. For the WINTERS or ADDWINTERS method, w1 gives the weight for updating the constant component, w2 gives the weight for updating the linear and quadratic trend components, and w3 gives the weight for updating the seasonal component. The w2 and w3 values are optional. Each value in the WEIGHT= option must be between 0 and 1. For default values, see "EXPO Method" and "WINTERS Method" later in this chapter.

ZEROMISS
treats zeros at the beginning of a series as missing values. For example, a product may be introduced at a date after the date of the first observation in the data set, and the sales variable for the product may be recorded as zero for the observations prior to the introduction date. The ZEROMISS option says to treat these initial zeros as missing values.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.