Optional Python Lab 3 — Fit and Audit ARMA Errors
Optional Python Lab 3 — Fit and Audit ARMA Errors
Question
After deterministic structure is removed, which small ARMA model explains the remaining linear dependence without spending unsupported parameters?
The lab deliberately compares only five candidates. Exhaustive order searches can optimise noise and make the analyst's search process invisible.
Fit and audit
Compare ARMA candidates
Audit sequence
- Root moduli above one support the enforced stationary/invertible representation; values near one signal fragile persistence.
- AICc is the main small-sample ranking here; BIC shows whether a stronger complexity penalty changes the decision.
- Residual plots ask about breaks, runs, and variance—not only average size.
- Ljung–Box tests remaining linear correlation up to a declared lag; a large p-value is not proof of iid Gaussian errors.
- The model remains provisional until rolling-origin forecast performance is compared with seasonal naive.
The true error is AR(1), but the finite sample may choose another small model. Change the seed and count selection frequencies. If the selected order changes often while forecast accuracy barely moves, report model-selection uncertainty instead of a single “correct” order.
Candidate ledger
Candidate set and why it was bounded:
AICc/BIC result:
Root boundary:
Residual pattern:
Ljung–Box lag and result:
Distribution/variance concern not tested:
Forecast comparison still required:
Two-stage boundary
The deterministic regression was estimated before ARMA fitting. This is transparent for teaching but understates joint uncertainty. The next lab estimates deterministic terms and AR errors together with SARIMAX.
Continue to Python Lab 4.
Optional Python Lab 2 — Diagnose Stationarity
Compare ADF/KPSS evidence for differencing with a mechanism-aligned deterministic adjustment.
Optional Python Lab 4 — Forecast, Backtest, and Monitor
Evaluate regression with AR errors against seasonal naive using rolling origins, MASE, and interval coverage.