statable Statistics for study and research

What might happen next? Forecast with ARIMA, automatic selection and smoothing

In brief

In the card "How does a value develop over time?" there is the section "What might happen next? (forecast)" below the decomposition. Nothing is calculated without a click. You can choose the automatic selection (Statable suggests an ARIMA model), ARIMA with an order you choose yourself, and exponential smoothing (simple, with trend, Holt-Winters additive or multiplicative). The result shows a checklist first, then the chart with the 80% and 95% band, the forecast table, the model, with the automatic selection the five best models, and a test period.

When the forecast is blocked

The choices

How the automatic selection chooses

Statable follows Hyndman and Khandakar (2008). First the number of differences: d (0 to 2) by the KPSS test (limit 0.463), D (0 or 1) by the seasonal strength (limit 0.64). Then it fits all models up to p, q ≤ 2 with a season (up to 3 without), P, Q ≤ 1 and p + q + P + Q ≤ 5, with and without a constant, and orders them by AICc. The first is the suggestion. The table shows the five best with ΔAICc. With a period above 24 or fewer than three full periods the automatic selection ignores the season.

Trap: the smallest AICc is no proof

The AICc only compares the models it sees. If the second model is less than 2 above (ΔAICc < 2), several models are about equally good; then compare the forecasts ("Calculate this model" in the table). With fewer than 50 values the choice of model is uncertain (Box and Jenkins). The AICc is not suitable for comparing models with different differences.

Reading the result

Requirements and limits

Reporting the result

For the monthly airline passengers ARIMA(0,1,1)(0,1,1)[12] was estimated on the log scale (MA 1 = −.402, seasonal MA 1 = −.557; AICc = −483.21). Ljung-Box Q(24) = 26.45, df = 22, p = .233. In the 12-month test period the RMSE was 18.59 against 50.71 for the simple rule. Forecast for the first month: 450, 95% interval [419, 484].

For specialists

Everything is calculated by R (only stats, no extra package): arima (maximum likelihood), predict for the mean and standard error, HoltWinters, stl for the seasonal strength, Box.test. The model selection corresponds to forecast::auto.arima with stepwise = FALSE and approximation = FALSE: on ten series, each with and without log, all 20 runs gave the same model, the same AICc and the same point forecast.

The limits deliberately differ from forecast: forecast calculates σ² with a degrees-of-freedom correction, Statable uses stats::predict (σ² from maximum likelihood).

Differences from SPSS

Sources

Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 27(3).

Box, G. E. P., & Jenkins, G. M.: Time series analysis: Forecasting and control (Wiley).

Kwiatkowski, D., Phillips, P. C. B., Schmidt, P., & Shin, Y. (1992). Testing the null hypothesis of stationarity against the alternative of a unit root. Journal of Econometrics, 54, 159-178.

Typical examples

Related

Open in Statable