CESM Procedure

Getting Started: CESM Procedure

The CESM procedure is simple to use and does not require in-depth knowledge of forecasting methods. It can provide results in output data tables. The examples in this section are more fully illustrated in Examples: CESM Procedure.

The following statements generate forecasts for every numeric variable in the time series in the input data table mylib.sales, which contains sales data that are recorded monthly:

proc cesm data=mylib.sales outfor=mylib.nextyear;
   id date interval=month;
   forecast _numeric_ / lead=12;
run;

The DATA= option specifies mylib.sales as the input data table, and the OUTFOR= option requests that the forecast be output to the mylib.nextYear table. The ID statement specifies the variable that represents time (Date) and specifies that the time series data are spaced monthly. The _NUMERIC_ specification in the FORECAST statement requests that every numeric variable in the input data table be forecast, and the LEAD=12 options requests that the time series be forecast for the next 12 months.

The following statements show how you can forecast data that contain transactional variables that are not recorded at any specific frequency:

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

The DATA= option specifies the input data table mylib.websites, which contains three variables (Boats, Cars, and Planes) in internet data that are recorded at no particular time interval. The OUTFOR= option requests that forecasts for the total daily values be recorded in the mylib.nextWeek data table. The ID statement specifies Time (which records the time of a website hit) as the variable that represents time and requests that the data be accumulated into a daily time series. The FORECAST statement requests that forecasts for the Boats, Cars, and Planes variables be generated. The LEAD=7 option requests that forecasts be generated for the next seven days. Because the METHOD= option is not specified in the FORECAST statement, PROC CESM fits each series by selecting the best exponential smoothing model (which is the default model) according to the default criterion of root mean square error (RMSE).

Last updated: July 09, 2026