11 SARIMA Model Building and Diagnostics
11.1 Model building and selection
The richness of the class of (S)AR(I)MA models is a double-edged sword – they are flexible but also difficult to use:
- ARMA has two orders: AR order
, MA order ; - ARIMA has one more order: order of difference
; - seasonal ARMA has another two orders: seasonal AR order
, seasonal MA order ; - SARIMA has one more order: order of seasonal difference
.
Now we need sensible model-building strategies and model adequacy criteria. Thus we will honor the principle of parsimony: models should be as simple as possible but not simpler.
“All models are wrong but some are useful”
Also, recall that over-fitting and/or over-differencing leads to overly complicated models and increased variance of estimates. Thus we should first plot the data. Then we may transform it to make the variance constant if necessary and also possibly remove deterministic components (trends, seasonality) if appropriate. Now we need to model the stochastic component, which can be achieved with
- differencing appropriately (until stationary, not too much, use unit root tests if uncertain);
- starting with a simple model (white noise);
- performing diagnostics of residuals (acf, pacf, Box test);
- identifying orders and modifying the model (increase model complexity) to remedy;
- continuing until approximately white noise;
- possibly checking the model by slightly overfitting.
Last, but not least, we use the model for prediction. But a question might arise whether we should differentiate or not:
- if the series is non-stationary, differencing may make it stationary;
- if the series is stationary, differencing will preserve stationarity but complicate autocorrelation (non-invertibility).
Recall that the random walk is an AR sequence with
- null hypothesis
: is a root; - alternative
: all roots our outside the unit circle.
One can use, for example, the Dickey-Fuller test or Phillips-Perron test, which use non-standard distributions of the test statistics (non-stationary data under the null hypothesis) and in R
they can be used with PP.test
, or adf.test
and pp.test
in the package tseries.
11.2 Modal diagnostics
For model diagnostics, we consider the standardized residuals
is an estimator (e.g. maximum likelihood) of all model parameters (AR, MA, coefficients, white noise variance, possibly mean and covariates); is the prediction error for from .
If the right model is used, then for large R
use function tsdiag
). Also, check for approximate normality of the residuals using the QQ plot, histogram,… (needed for prediction intervals).
11.3 Model order selection
We need an objective, which would quantitatively measure model adequacy because surely bigger models provide a better fit – likelihood or least squares are always better in more complex models. However, there is a price to pay as a more complex model increases the variance of estimates. Also, we need to find a good compromise between fit and variance and penalize for complexity – that is to maximize
denotes collectively all parameters (AR, MA coefficients, white noise variance, possibly mean and regression coefficients); is the number of parameters (e.g. for an model with mean); is the -likelihood.
Our goal is then to select the model that has the smallest value of
Note that we use selection criteria for models estimated from the same data, in particular, do not compare models with different orders of differencing!
The use of pure
Also one can use
As a rule of thumb,