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_ date sales
1 N JUL91 25
2 NRESID JUL91 25
3 DF JUL91 22
4 SIGMA JUL91 0.2001613
5 CONSTANT JUL91 9.4348822
6 LINEAR JUL91 0.1242648
7 AR1 JUL91 0.5206294
8 AR2 JUL91 .
9 AR3 JUL91 .
10 AR4 JUL91 .
11 AR5 JUL91 .
12 AR6 JUL91 .
13 AR7 JUL91 .
14 AR8 JUL91 .
15 SST JUL91 21.28342
16 SSE JUL91 0.8793714
17 MSE JUL91 0.0399714
18 RMSE JUL91 0.1999286
19 MAPE JUL91 1.2280089
20 MPE JUL91 -0.050139
21 MAE JUL91 0.1312115
22 ME JUL91 -0.001811
23 MAXE JUL91 0.3732328
24 MINE JUL91 -0.551605
25 MAXPE JUL91 3.2692294
26 MINPE JUL91 -5.954022
27 RSQUARE JUL91 0.9586828
28 ADJRSQ JUL91 0.9549267
29 RW_RSQ JUL91 0.2657801
30 ARSQ JUL91 0.9474145
31 APC JUL91 0.044768
32 AIC JUL91 -77.68559
33 SBC JUL91 -74.02897
34 CORR JUL91 0.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. (See the section STEPAR Method for more information.)

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. See the section OUTEST= Data Set for details.