6.8.3.2.4. statsmodels.sandbox.stats.diagnostic.acorr_lm

statsmodels.sandbox.stats.diagnostic.acorr_lm(x, maxlag=None, autolag='AIC', store=False, regresults=False)[source]

Lagrange Multiplier tests for autocorrelation

This is a generic Lagrange Multiplier test for autocorrelation. I don’t have a reference for it, but it returns Engle’s ARCH test if x is the squared residual array. A variation on it with additional exogenous variables is the Breush-Godfrey autocorrelation test.

Parameters:

resid : ndarray, (nobs,)

residuals from an estimation, or time series

maxlag : int

highest lag to use

autolag : None or string

If None, then a fixed number of lags given by maxlag is used.

store : bool

If true then the intermediate results are also returned

Returns:

lm : float

Lagrange multiplier test statistic

lmpval : float

p-value for Lagrange multiplier test

fval : float

fstatistic for F test, alternative version of the same test based on F test for the parameter restriction

fpval : float

pvalue for F test

resstore : instance (optional)

a class instance that holds intermediate results. Only returned if store=True

See also

het_arch, acorr_breush_godfrey, acorr_ljung_box