|
Chapter Contents |
Previous |
Next |
| The FORECAST Procedure |
This example uses the double exponential smoothing method to forecast the monthly U.S. sales of petroleum and related products series (PETROL) from the data set SASHELP.USECON. These data are taken from Business Statistics, published by the U.S. Bureau of Economic Analysis.
The following statements plot the PETROL series:
title1 "Sales of Petroleum and Related Products";
symbol1 i=spline v=circle;
axis2 label=( a=-90 r=90 "Petroleum and Coal Products");
proc gplot data=sashelp.usecon;
plot petrol * date = 1 /
haxis= '1jan80'd to '1jan92'd by year
vaxis=axis2;
where date >= '1jan80'd;
format date year4.;
run;
The plot is shown in Output 12.3.1.
Output 12.3.1: Sales of Petroleum and Related Products
|
proc forecast data=sashelp.usecon interval=month
method=expo trend=2 lead=12
out=out outfull outest=est;
id date;
var petrol;
where date >= '1jan80'd;
run;
The following statements print the OUTEST= data set:
title2 'OUTEST= Data Set: EXPO Method'; proc print data=est; run;
The PROC PRINT listing of the output data set is shown in Output 12.3.2.
Output 12.3.2: The OUTEST= Data Set Produced by PROC FORECAST
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.