CESM Procedure

Example 9.3 Specifying the Forecasting Model

This example illustrates how you can use the CESM procedure to specify different models for different series. Internet data from the previous example are used for this illustration.

The statements in this example assume that your SAS library is named mylib, but you can substitute any appropriately defined SAS library.

This example forecasts the Boats variable by using the seasonal exponential smoothing model (SEASONAL), the Cars variable by using the Winters (multiplicative) model (WINTERS), and the Planes variable by using the log Winters (additive) model (ADDWINTERS). The following CESM procedure statements forecast each of the transactional data series based on these requirements:

proc cesm data=mylib.websites outfor=mylib.nextweek;
   id time interval=dtday accumulate=total;
   forecast boats  / lead=7 method=seasonal;
   forecast cars   / lead=7 method=winters;
   forecast planes / lead=7 method=addwinters transform=log;
run;

The following statements plot the forecasts that are related to the internet data:

%plotActualPredict(mylib.nextweek, time, boats, '11APR2000:00:00:00'dt,
   '13MAR2000:00:00:00'dt, '18APR2000:00:00:00'dt, dtweek, 'Time of Web Hit',
   0, 50000, 10000, 'Web Hits');
%plotActualPredict(mylib.nextweek, time, cars, '11APR2000:00:00:00'dt,
   '13MAR2000:00:00:00'dt, '18APR2000:00:00:00'dt, dtweek, 'Time of Web Hit',
   0, 250000, 50000, 'Web Hits');
%plotActualPredict(mylib.nextweek, time, planes, '11APR2000:00:00:00'dt,
   '13MAR2000:00:00:00'dt, '18APR2000:00:00:00'dt, dtweek, 'Time of Web Hit',
   0, 12000, 2000, 'Web Hits');

The plots are shown in Output 9.3.1, Output 9.3.2, and Output 9.3.3. The historical data and their fits are shown to the left of the reference line, and the forecasts for the next seven days are shown to the right.

Output 9.3.1: Internet Data Forecast Plots (Boats)

Internet Data Forecast Plots (Boats)


Output 9.3.2: Internet Data Forecast Plots (Cars)

Internet Data Forecast Plots (Cars)


Output 9.3.3: Internet Data Forecast Plots (Planes)

Internet Data Forecast Plots (Planes)


Last updated: November 24, 2025