statsmodels.stats.diagnostic.acorr_breusch_godfrey

statsmodels.stats.diagnostic.acorr_breusch_godfrey(res, nlags=None, store=False)[source]

Breusch-Godfrey Lagrange Multiplier tests for residual autocorrelation.

Parameters

res : RegressionResults

Estimation results for which the residuals are tested for serial correlation.

nlags : int, default None

Number of lags to include in the auxiliary regression. (nlags is highest lag).

store : bool, default False

If store is true, then an additional class instance that contains intermediate results is returned.

Returns

lm : float

Lagrange multiplier test statistic.

lmpval : float

The p-value for Lagrange multiplier test.

fval : float

The value of the f statistic for F test, alternative version of the same test based on F test for the parameter restriction.

fpval : float

The pvalue for F test.

res_store : ResultsStore

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

Notes

BG adds lags of residual to exog in the design matrix for the auxiliary regression with residuals as endog. See [R83], section 12.7.1.

References

R83(1,2)

Greene, W. H. Econometric Analysis. New Jersey. Prentice Hall; 5th edition. (2002).