AI Glossary / Statistics and probability / Advanced
Breusch - Godfrey test
Definition
The Breusch - Godfrey test is a regression diagnostic for serial correlation in the model's errors up to a specified lag order. It examines whether lagged residuals help explain current residuals after retaining the original regression predictors. A common version is a Lagrange multiplier test with an asymptotic chi-square reference distribution.
What it means
A regression can have residuals that look reasonable individually while still showing a pattern over time. For example, several underpredictions may occur consecutively, followed by several overpredictions. Such patterns can indicate that the model has not captured relevant temporal structure.
The test concerns residual dependence conditional on the regression model. It is not a test of whether the raw outcome series is autocorrelated, and it does not test whether the regression's overall predictive accuracy is good enough for business use.
How it works
Fit the original regression and retain its residuals in the correct observation order. Choose a maximum lag p. In an auxiliary regression, use the current residual as the outcome and include both the original predictors and residual lags one through p.
The null hypothesis sets all p lag coefficients to zero. The common LM statistic is n times the auxiliary regression's R-squared, using the observation count appropriate to that calculation. Under suitable assumptions and in sufficiently large samples, its reference distribution is chi-square with p degrees of freedom. Software may also report an alternative F test of the joint lag restrictions.
Initial observations need a specified convention because their preceding residuals are unavailable. Implementations may use zero-filled initial lags or omit initial rows. Report the convention and effective sample size rather than silently mixing results from different constructions.
Three practical examples
- A team models daily demand using a regression benchmark. It checks residual autocorrelation at lags relevant to the daily operating cycle before interpreting ordinary regression uncertainty estimates.
- An analyst studies response-time variation in a service using ordered observations and explanatory workload variables. The test helps investigate whether remaining errors retain temporal structure after those variables are included.
- A forecasting study fits a dynamic regression containing a lagged outcome. A suitable Breusch - Godfrey procedure can examine additional residual serial correlation in settings where a basic Durbin - Watson interpretation would be inappropriate.
Think of it this way
Imagine that a forecast's mistakes leave a trail. If knowing yesterday's mistake helps explain today's mistake after accounting for the original predictors, the trail contains structure the model has not fully addressed. The test checks a specified part of that trail, not every possible form of dependence.
Worked example
Consider ten invented observations modeled using an intercept only. Suppose the fitted mean is 10 and the observations are 8, 9, 10, 11, 12, 12, 11, 10, 9, and 8. Their mean is indeed 10, giving residuals -2, -1, 0, 1, 2, 2, 1, 0, -1, and -2.
For a lag-one illustration, use the zero-filled initial-lag convention. The lagged residual vector is 0, -2, -1, 0, 1, 2, 2, 1, 0, and -1. Regress the ten current residuals on an intercept and this lagged vector.
The fitted auxiliary intercept is -2/13, approximately -0.153846, and the lag coefficient is 10/13, approximately 0.769231. The centered total sum of squares of the current residuals is 20. The auxiliary residual sum of squares is 140/13, approximately 10.769231.
Thus R-squared = 1 - (140/13)/20 = 6/13, approximately 0.461538. The LM statistic is 10 times 6/13 = 60/13, approximately 4.615385. With one lag, the chi-square-one approximation gives a p-value of approximately 0.03169.
At a prespecified five-percent threshold, that approximate calculation rejects the no-lag-one-correlation null. However, ten observations are a very small sample for relying on an asymptotic reference distribution. The example illustrates the computation, not a recommendation to trust its nominal significance level in such a small operational dataset.
The auxiliary lag coefficient is not itself a p-value, and the original intercept-only model's R-squared is not the R-squared used in this LM calculation. If additional predictors had been present in the original regression, they would also belong in the auxiliary regression.
Finally, shuffling the observations would change which residuals precede others and therefore change the diagnostic. Keeping the same ten numbers is insufficient: their temporal order is part of the analysis.
Illustrative case study
Fictional company Alder Forecasting uses a regression benchmark to predict service workload. Its average error appears acceptable, but residual plots show stretches of underprediction during recurring busy periods.
The analyst chooses lags based on the observation frequency and operating cycle, runs the diagnostic, and investigates omitted dynamics and seasonal structure. The team compares revised specifications using appropriate time-ordered evaluation. It distinguishes changes intended to improve forecasts from changes to the method used for estimating coefficient uncertainty. This is a fictional scenario, not evidence that one particular correction will solve every serial-correlation problem.
Common misconceptions and mistakes
The Breusch - Godfrey test is different from the Breusch - Pagan test, which concerns heteroskedasticity rather than serial correlation.
A failure to reject does not prove independent errors. Dependence at untested lags or nonlinear dependence may remain.
Rejection does not uniquely identify the cause. Missing predictors, omitted dynamics, structural changes, or other specification issues may require investigation.
Increasing the lag order indiscriminately adds parameters and can reduce precision, especially in short series. Choose lags for a reason and account for repeated testing when searching across many choices.
The standard reference distribution requires suitable conditions. Heteroskedasticity or other departures may call for a justified robust alternative rather than an unchanged textbook calculation.
Business use
Use the test when time-ordered regression diagnostics affect forecasting interpretation or statistical inference. Record the fitted model, observation frequency, chosen lags, and handling of initial observations. Combine the result with residual plots, domain knowledge, and evaluation on later data before changing a working system.
People also ask
Does it test one lag at a time?
A test with order p ordinarily tests the first p lag coefficients jointly.
Can it be used with lagged dependent variables?
Yes, under the relevant model and regularity conditions; this is one reason it is useful for dynamic regressions.
Does rejection prove the forecasts are useless?
No. Diagnostic evidence and practical predictive performance answer different questions.
Check your understanding
Which R-squared enters the LM statistic?
Answer: The auxiliary regression's.
What is the example's LM statistic?
Answer: Approximately 4.615385.
Why preserve order?
Answer: Lagged relationships depend on which observations precede others.
Related terms
- Serial correlation
- regression residual
- auxiliary regression
- Lagrange multiplier test
- Durbin–Watson statistic
- lag order
- dynamic regression
Learn next
Study residual autocorrelation plots and compare LM and F implementations. Examine how model respecification differs from using autocorrelation-robust uncertainty estimates.
More in Statistics and probability
- Box - Behnken design - A Box - Behnken design is a response-surface experimental design used to fit quadratic relationships between quantitative factors and an outcome.
- Box's M test - Box's M test is a statistical test of whether several populations have the same covariance matrix.
- Bradley-Terry Model - The Bradley-Terry model is a probabilistic model for pairwise comparisons.
- Breusch - Pagan test - The Breusch - Pagan test is a regression diagnostic for heteroskedasticity: error variance that changes with specified explanatory variables.
- Brown - Forsythe test - The Brown - Forsythe test commonly means a median-centered version of Levene's test for equality of population variances across groups.
- Brunner-Munzel test - The Brunner-Munzel test compares two independent populations through the probability that a randomly selected observation from one exceeds an observation...
Sources
Statsmodels, acorr_breusch_godfrey documentation: https://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.acorr_breusch_godfrey.html . Implementation: https://www.statsmodels.org/stable/_modules/statsmodels/stats/diagnostic.html#acorr_breusch_godfrey . Numerical data and company scenario are original illustrations.
Previous: Bregman method Next: Breusch - Pagan test