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:
resRegressionResults

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

nlagsint, optional

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

storebool, default False

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

Returns:
lmfloat

Lagrange multiplier test statistic.

lmpvalfloat

The p-value for Lagrange multiplier test.

fvalfloat

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

fpvalfloat

The pvalue for F test.

res_storeResultsStore

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 [1], section 12.7.1.

References

[1]

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


Last update: Dec 11, 2024