Home   >   User Resources   >   Online Help   >   apaARIMA.Diagnostics
 

 

Function index Version 3.0.0

apaARIMA.Diagnostics(Series, p, d, q, maxLag, IncludeConstant)

Excel=apaARIMA.Diagnostics(Series, p, d, q, maxLag, IncludeConstant)

Result

Returns residual diagnostics for an ARIMA(p,d,q) model.

Syntax

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

p: AR order

d: integration order

q: MA order

maxLag: maximum lag for the residual autocorrelations and the Ljung–Box test (optional, default 20)

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.

p, d, q and maxLag are rounded to integers; the orders are validated and maxLag must be at least 1.

An ARIMA(p,d,q) model is fitted as in apaARIMA.Estimate. The first p observations of the differenced series are conditioned on and have no residuals; they are excluded from the diagnostics.

Residual diagnostics are computed up to maxLag.

Two-column result table with:

  • Mean and variance of the residuals.

  • Ljung–Box Q statistic and its degrees of freedom.

  • Residual autocorrelations for lags 1 to maxLag.