?>
The `arima` action provides a comprehensive set of tools for univariate time series analysis, focusing on Autoregressive Integrated Moving Average (ARIMA) models. This action allows for the identification, estimation, and forecasting of time series data. It supports a wide range of model specifications, including simple and seasonal ARIMA models, as well as the inclusion of transfer functions for modeling the impact of explanatory variables. The action also provides options for handling missing values, specifying time intervals, and controlling the output tables for detailed analysis of results.
| Parameter | Description |
|---|---|
| alignId | specifies the time ID alignment. |
| auxData | specifies the auxiliary time series data tables. |
| boundaryAlign | specifies the starting and ending timestamp alignment. |
| casOut | names the output data table to contain the forecasts of the variables. |
| display | specifies the list of display tables that you want the action to create. If this parameter is not specified, all tables are created. |
| interval | specifies the time interval (or frequency). |
| nlFormat | when set to True, chooses the best international format for the timestamp variable on the basis of the accumulation time interval. When set to False, it chooses the best English-language-based format for the timestamp variable. This option is ignored if you specify the format of the timestamp variable directly. |
| nThreads | specifies the number of threads that are used per worker node in a CAS session. Threads are used to both preprocess and analyze input data in parallel. You must specify a value greater than or equal to 0. If you specify 0, which is the default, the number of threads is set to the maximum number of licensed cores. |
| outEst | names the output data table to contain the model parameter estimates and the associated test statistics and probability values. |
| outFor | names the output data table to contain the forecast time series components (actual, predicted, lower confidence limit, upper confidence limit, prediction error, prediction standard error). |
| outputTables | specifies the list of display tables that you want to output as CAS tables. If this parameter is not specified, no tables are output as CAS tables. |
| outStat | names the output data table to contain the fit statistics. |
| seasonality | specifies the number of time periods per seasonal cycle (the default is based on the time interval). |
| series | specifies the name of the series to be modeled and the modeling options. |
| sumOut | names the output data table to contain the summary statistics and the forecast summation. |
| table | specifies the input data table. |
| tEnd | specifies the end of the time window. |
| timeId | specifies the timestamp variable. |
| trimId | specifies how to trim the time series. None means that no missing values are trimmed. LEFT trims missing values at the beginning of the time series. RIGHT trims missing values at the end of the time series. BOTH trims missing values at both the beginning and end of the time series. |
| tStart | specifies the start of the time window. |
This example creates a sample time series dataset named 'series' with a date and a value 'y'. This data will be used in subsequent examples to demonstrate the 'arima' action.
data mycas.series;
format date date9.;
do date = '01jan2020'd to '31dec2024'd;
y = ranuni(1)*100;
output;
end;
run;This example performs a simple ARIMA model estimation on the 'y' variable from the 'series' table. It specifies a simple autoregressive model of order 1 (p=1) and a simple differencing of order 1 (diff=1).
| 1 | PROC CAS; |
| 2 | uniTimeSeries.arima / |
| 3 | TABLE={name='series', caslib='mycas'}, |
| 4 | timeId={name='date'}, |
| 5 | interval='day', |
| 6 | series={name='y', model={estimate={p=1, diff=1}}}; |
| 7 | RUN; |
| 8 | QUIT; |
This example demonstrates a more complex seasonal ARIMA model. It includes a non-seasonal AR component (p=1), a seasonal AR component (p={factor={12}}), differencing (diff=1), and a seasonal moving average component (q={factor={12}}). It also applies a log transformation to the series. The action will estimate the model and then generate a 12-period forecast, storing the results in 'arima_forecast' and parameter estimates in 'arima_estimates'.
| 1 | PROC CAS; |
| 2 | uniTimeSeries.arima / |
| 3 | TABLE={name='series', caslib='mycas'}, |
| 4 | timeId={name='date'}, |
| 5 | interval='month', |
| 6 | seasonality=12, |
| 7 | series={name='y', model={estimate={transform='log', p={1, {factor=12}}, q={{factor=12}}, diff=1}, forecast={lead=12}}}, |
| 8 | outFor={name='arima_forecast', caslib='mycas', replace=true}, |
| 9 | outEst={name='arima_estimates', caslib='mycas', replace=true}; |
| 10 | RUN; |
| 11 | QUIT; |