ARIMA Models
AutoRegressive Integrated Moving Average - models dependencies between observations.
| Model | Description |
|---|---|
ARIMA | Classic ARIMA with manual parameter specification |
AutoARIMA | Automatic ARIMA with (p,d,q) selection |
Showing 2 of 2
ARIMA
Classic ARIMA model with manual parameter specification.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
p | INTEGER | Yes | AR (autoregressive) order |
d | INTEGER | Yes | Differencing order |
q | INTEGER | Yes | MA (moving average) order |
seasonal_period | INTEGER | No | For seasonal ARIMA |
P | INTEGER | No | Seasonal AR order |
D | INTEGER | No | Seasonal differencing |
Q | INTEGER | No | Seasonal MA order |
Example
-- Non-seasonal ARIMA(1,1,1)
SELECT * FROM anofox_fcst_ts_forecast(
'sales_data',
'date',
'sales',
'ARIMA',
28,
MAP{'p': '1', 'd': '1', 'q': '1'}
);
-- Seasonal ARIMA(1,1,1)(1,1,1)[7]
SELECT * FROM anofox_fcst_ts_forecast(
'weekly_data',
'date',
'value',
'ARIMA',
28,
MAP{'p': '1', 'd': '1', 'q': '1', 'P': '1', 'D': '1', 'Q': '1', 'seasonal_period': '7'}
);
Best for: Complex patterns when you know the appropriate order.
AutoARIMA
Automatic ARIMA with (p,d,q) parameter selection using information criteria.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasonal_period | INTEGER | auto | Seasonal period |
max_p | INTEGER | 5 | Maximum AR order |
max_d | INTEGER | 2 | Maximum differencing order |
max_q | INTEGER | 5 | Maximum MA order |
Example
SELECT * FROM anofox_fcst_ts_forecast(
'sales_data',
'date',
'sales',
'AutoARIMA',
28,
MAP{'seasonal_period': '7'}
);
Best for: Complex patterns, long-term forecasts, automatic tuning.
Parameter Selection Guide
| Scenario | p | d | q |
|---|---|---|---|
| Stationary data | 1-2 | 0 | 1-2 |
| Trending data | 1-2 | 1 | 1-2 |
| Strong trend | 1-2 | 2 | 1-2 |
| Random walk | 0 | 1 | 0 |
When to Use ARIMA vs AutoARIMA
| Scenario | Recommended |
|---|---|
| Known order from domain expertise | ARIMA |
| Exploratory analysis | AutoARIMA |
| Production pipeline | AutoARIMA |
| Performance-critical | ARIMA (faster) |
| Many time series | AutoARIMA |