The `uniTimeSeries.esm` action provides exponential smoothing models for univariate time series analysis. It is designed to automatically process transactional data, accumulating it into time series based on a specified time interval (e.g., daily, monthly). The action can automatically select the best smoothing model (Simple, Double, Linear, Damped Trend, Seasonal, Winters, etc.) based on a specified selection criterion (like RMSE or AIC) or apply a specific user-defined method. It generates forecasts, confidence intervals, and various fit statistics.
| Parameter | Description |
|---|---|
| table | Specifies the input data table containing the time series data. This is a required parameter. |
| timeId | Specifies the timestamp variable in the input table. This variable defines the time index for the analysis. |
| interval | Specifies the frequency of the accumulated time series (e.g., 'DAY', 'MONTH', 'YEAR'). |
| forecast | Specifies options related to the forecast, such as the target variable name, the forecasting method (e.g., BEST, WINTERS), the lead (number of periods to forecast), and the significance level (alpha). |
| casOut | Names the output table that will contain the forecasts of the variables. |
| outFor | Names the output table that will contain detailed forecast components including actual, predicted, confidence limits, and prediction errors. |
| outStat | Names the output table that will contain the fit statistics (e.g., RMSE, AIC) for the selected models. |
| outEst | Names the output table to contain the model parameter estimates. |
| seasonality | Specifies the length of the seasonal cycle. If not specified, it is inferred from the time interval. |
Generates a synthetic dataset containing monthly sales data with a trend and seasonality, then loads it into a CAS library.
| 1 | |
| 2 | DATA casuser.sales_data; |
| 3 | date = '01JAN2020'd; |
| 4 | DO i = 1 to 48; |
| 5 | sales = 100 + i + 10 * sin(i) + 5 * rannor(123); |
| 6 | OUTPUT; |
| 7 | date = intnx('month', date, 1); |
| 8 | END; |
| 9 | FORMAT date date9.; |
| 10 | keep date sales; |
| 11 | |
| 12 | RUN; |
| 13 |
Performs automatic forecasting on the 'sales' variable using the 'BEST' exponential smoothing method selection, accumulated by month.
| 1 | |
| 2 | PROC CAS; |
| 3 | uniTimeSeries.esm / TABLE={name="sales_data", caslib="casuser"} timeId={name="date"} interval="month" forecast={{name="sales", method="BEST", lead=12}}; |
| 4 | |
| 5 | RUN; |
| 6 |
Forecasts the 'sales' variable using the Winters multiplicative method (suitable for trend and seasonality), requests 12 periods ahead, and saves detailed forecast data, statistics, and estimates to specific CAS tables.
| 1 | |
| 2 | PROC CAS; |
| 3 | uniTimeSeries.esm / TABLE={name="sales_data", caslib="casuser"} timeId={name="date"} interval="month" forecast={{name="sales", method="WINTERS", lead=12, alpha=0.05}} outFor={name="sales_forecast", caslib="casuser", replace=true} outStat={name="sales_stats", caslib="casuser", replace=true} outEst={name="sales_estimates", caslib="casuser", replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |