The FORECAST Procedure

Model Parameters and Goodness-of-Fit Statistics

You can write the parameters of the forecasting models used, as well as statistics that measure how well the forecasting models fit the data, to an output SAS data set by using the OUTEST= option. The options OUTFITSTATS, OUTESTTHEIL, and OUTESTALL control what goodness-of-fit statistics are added to the OUTEST= data set.

For example, the following statements add the OUTEST= and OUTFITSTATS options to the previous example to create the output statistics data set EST for the results of the default stepwise autoregressive forecasting method:

proc forecast data=past interval=month lead=10
              out=pred outfull outresid
              outest=est outfitstats;
   id date;
   var sales;
run;

proc print data=est;
run;

The PRINT procedure prints the OUTEST= data set, as shown in Figure 16.6.

Figure 16.6: The OUTEST= Data Set for STEPAR Method

Obs_TYPE_datesales
1NJUL9125
2NRESIDJUL9125
3DFJUL9122
4SIGMAJUL910.2001613
5CONSTANTJUL919.4348822
6LINEARJUL910.1242648
7AR1JUL910.5206294
8AR2JUL91.
9AR3JUL91.
10AR4JUL91.
11AR5JUL91.
12AR6JUL91.
13AR7JUL91.
14AR8JUL91.
15SSTJUL9121.28342
16SSEJUL910.8793714
17MSEJUL910.0399714
18RMSEJUL910.1999286
19MAPEJUL911.2280089
20MPEJUL91-0.050139
21MAEJUL910.1312115
22MEJUL91-0.001811
23MAXEJUL910.3732328
24MINEJUL91-0.551605
25MAXPEJUL913.2692294
26MINPEJUL91-5.954022
27RSQUAREJUL910.9586828
28ADJRSQJUL910.9549267
29RW_RSQJUL910.2657801
30ARSQJUL910.9474145
31APCJUL910.044768
32AICJUL91-77.68559
33SBCJUL91-74.02897
34CORRJUL910.9791313


In the OUTEST= data set, the DATE variable contains the ID value of the last observation in the data set used to fit the forecasting model. The variable SALES contains the statistic indicated by the value of the _TYPE_ variable. The _TYPE_=N, NRESID, and DF observations contain, respectively, the number of observations read from the data set, the number of nonmissing residuals used to compute the goodness-of-fit statistics, and the number of nonmissing observations minus the number of parameters used in the forecasting model.

The observation that has _TYPE_=SIGMA contains the estimate of the standard deviation of the one-step prediction error computed from the residuals. The _TYPE_=CONSTANT and _TYPE_=LINEAR observations contain the coefficients of the time trend regression. The _TYPE_=AR1, AR2, …, AR8 observations contain the estimated autoregressive parameters. A missing autoregressive parameter indicates that the autoregressive term at that lag was not retained in the model by the stepwise model selection method. (For more information, see the section STEPAR Method.)

The other observations in the OUTEST= data set contain various goodness-of-fit statistics that measure how well the forecasting model used fits the given data. For more information, see the section OUTEST= Data Set.