Home   >   User Resources   >   Online Help   >   apaARIMA.Forecast
 

 

Function index Version 3.0.0

apaARIMA.Forecast(Series, p, d, q, Horizons, IncludeConstant)

Excel=apaARIMA.Forecast(Series, p, d, q, Horizons, IncludeConstant)

Result

Forecasts an ARIMA(p,d,q) model and returns point forecasts together with forecast error variances and 95% prediction intervals.

Syntax

Series: n x 1 or 1 x n range containing the time series

p: AR order

d: integration order

q: MA order

Horizons: 1 x m or m x 1 vector of positive forecast horizons

IncludeConstant: TRUE to include an intercept (d = 0) or a drift (d = 1) (optional, default TRUE). For d ≥ 2 no constant is estimated regardless of this argument, because a constant in the twice or more differenced series would induce a quadratic or higher-order polynomial trend in the forecasts.

Algorithm

The series is flattened to a vector; at least 10 observations are required.

Horizons are converted to positive integers; empty or invalid horizons are rejected.

p, d and q are rounded to integers and the ARIMA orders are validated.

The ARIMA(p,d,q) model is fitted with the chosen deterministic term setting.

Forecasts are computed recursively for the requested horizons, replacing future observations with forecasts and future errors with zero.

The forecast error variance at horizon h is σ²·(ψ0² + ψ1² + … + ψh−1²), where ψj are the moving-average weights of the integrated model φ(B)(1 − B)^d·yt = c + θ(B)·εt. For d ≥ 1 the variance therefore grows with the horizon, as the integration of the forecast errors requires; for a random walk it equals h·σ².

Result table with the columns:

  • Horizon

  • MeanForecast

  • ForecastErrorVariance

  • Lower95

  • Upper95

The 95% interval has the standard form forecast mean ±1.96×\pm 1.96 \timesforecast standard error.