|
Chapter Contents |
Previous |
Next |
| The FORECAST Procedure |
This example uses the stepwise autoregressive method to forecast the monthly U.S. sales of durable goods (DURABLES) and nondurable goods (NONDUR) from the SASHELP.USECON data set. The data are from Business Statistics published by the U.S. Bureau of Economic Analysis. The following statements plot the series:
symbol1 i=spline v=dot;
proc gplot data=sashelp.usecon;
plot ( durables nondur ) * date = 1 /
haxis= '1jan80'd to '1jan92'd by year;
where date >= '1jan80'd;
format date year4.;
run;
The plots are shown in Output 12.2.1 and Output 12.2.2.
Output 12.2.1: Durable Goods Sales
|
|
title1 "Forecasting Sales of Durable and Nondurable Goods";
proc forecast data=sashelp.usecon interval=month
method=stepar trend=2 lead=12
out=out outfull outest=est;
id date;
var durables nondur;
where date >= '1jan80'd;
run;
The following statements print the OUTEST= data set.
title2 'OUTEST= Data Set: STEPAR Method'; proc print data=est; run;
The PROC PRINT listing of the OUTEST= data set is shown in Output 12.2.3.
Output 12.2.3: The OUTEST= Data Set Produced by PROC FORECAST
title1 'Plot of Forecasts from STEPAR Method';
symbol1 i=none v=star h=2; /* for _type_=ACTUAL */
symbol2 i=spline v=circle h=2; /* for _type_=FORECAST */
symbol3 i=spline l=3; /* for _type_=L95 */
symbol4 i=spline l=3; /* for _type_=U95 */
proc gplot data=out;
plot ( durables nondur ) * date = _type_ /
HREF='15dec91'd
haxis= '1jan90'd to '1jan93'd by qtr;
where date >= '1jan90'd;
run;
The plots are shown in Output 12.2.4 and Output 12.2.5.
Output 12.2.4: Forecast of Durable Goods Sales
|
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.