Skip to main content

AR / MA / ARMA / ARIMA — The Box-Jenkins family

This is the classic family of univariate time-series models that describe and forecast a series from its own past:

  • AR(p) — Autoregressive: YtY_t depends on its own lagged values.
  • MA(q) — Moving Average: YtY_t depends on lagged errors (shocks).
  • ARMA(p,q) — combines AR and MA for stationary series.
  • ARIMA(p,d,q) — adds differencing of order dd to handle non-stationary series.
When to use

Use for forecasting a single series (revenue, inflation, prices). Check stationarity first (ADF/KPSS); if non-stationary, difference it (order dd) ⇒ ARIMA. Seasonal ⇒ SARIMA; volatility clustering ⇒ GARCH.


Model specification​

ARMA(p,q):

Yt=c+∑i=1pϕiYt−i+εt+∑j=1qθjεt−jY_t = c + \sum_{i=1}^{p} \phi_i Y_{t-i} + \varepsilon_t + \sum_{j=1}^{q} \theta_j \varepsilon_{t-j}

ARIMA(p,d,q): apply ARMA(p,q) to the dd-times differenced series ΔdYt\Delta^d Y_t.


Box-Jenkins workflow​


Running in EcoLab​

  1. Modeling module → Univariate time series family → ARIMA.
  2. Choose the series YY; declare (p,d,q)(p,d,q) or use auto-ARIMA (AIC/BIC).
  3. Run; view residual diagnostics + forecasts with confidence intervals; export the replication code.

Replication code​

* --- ARIMA(1,1,1) ---
* Declare time variable
tsset time

* Estimate ARIMA(1,1,1) by MLE
arima gdp_growth, arima(1,1,1)

* Post-estimation diagnostics
predict resid, residuals
corrgram resid, lags(20)

* Forecast
tsappend, add(12)
predict yhat, dynamic(.)

Limitations​

  • Assumes a linear relationship and stable structure; weak under structural breaks.
  • Does not model time-varying variance ⇒ use ARCH/GARCH.

Video tutorial​

Video Tutorial: Running ARIMA in EcoLab

See also​