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
,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.
- res
- 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.
- lm
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).