Resources

Forecasting Retail Sales

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: forex02.sas
 Description: Example program from SAS/ETS User's Guide,
              The FORECAST Procedure
       Title: Forecasting Retail Sales
     Product: SAS/ETS Software
        Keys: time series forecasting
        PROC: FORECAST
       Notes:

--------------------------------------------------------------*/

title1 'Sales of Durable and Nondurable Goods';
title2 'Plot of Forecast from WINTERS Method';
proc sgplot data=sashelp.usecon;
   series x=date y=durables / markers markerattrs=(symbol=circlefilled);
   xaxis values=('1jan80'd to '1jan92'd by year);
   yaxis values=(60000 to 150000 by 10000);
   format date year4.;
run;

title1 'Sales of Durable and Nondurable Goods';
title2 'Plot of Forecast from WINTERS Method';
proc sgplot data=sashelp.usecon;
   series x=date y=nondur / markers markerattrs=(symbol=circlefilled);
   xaxis values=('1jan80'd to '1jan92'd by year);
   yaxis values=(70000 to 130000 by 10000);
   format date year4.;
run;

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;

title2 'OUTEST= Data Set: STEPAR Method';
proc print data=est;
run;

title1 'Plot of Forecasts from STEPAR Method';
proc sgplot data=out;
   series x=date y=durables / group=_type_;
   xaxis values=('1jan90'd to '1jan93'd by qtr);
   yaxis values=(100000 to 150000 by 10000);
   refline '15dec91'd / axis=x;
run;

proc sgplot data=out;
   series x=date y=nondur / group=_type_;
   xaxis values=('1jan90'd to '1jan93'd by qtr);
   yaxis values=(100000 to 140000 by 10000);
   refline '15dec91'd / axis=x;
run;