Breusch–Godfrey test
In
The regression models to which the test can be applied include cases where lagged values of the
The test is named after Trevor S. Breusch and Leslie G. Godfrey.
Background
The Breusch–Godfrey test is a test for
Because the test is based on the idea of
A similar assessment can be also carried out with the
Procedure
Consider a linear regression of any form, for example
where the errors might follow an AR(p) autoregressive scheme, as follows:
The simple regression model is first fitted by ordinary least squares to obtain a set of sample residuals .
Breusch and Godfrey[citation needed] proved that, if the following auxiliary regression model is fitted
and if the usual Coefficient of determination ( statistic) is calculated for this model:
- ,
where stands for the arithmetic mean over the last samples, where is the total number of observations and is the number of error lags used in the auxiliary regression.
The following asymptotic approximation can be used for the distribution of the test statistic:
when the null hypothesis holds (that is, there is no serial correlation of any order up to p). Here n is
Software
- In R, this test is performed by function bgtest, available in package lmtest.[5][6]
- In Stata, this test is performed by the command estat bgodfrey.[7][8]
- In SAS, the GODFREY option of the MODEL statement in PROC AUTOREG provides a version of this test.
- In Python Statsmodels, the acorr_breusch_godfrey function in the module statsmodels.stats.diagnostic [9]
- In EViews, this test is already done after a regression, at "View" → "Residual Diagnostics" → "Serial Correlation LM Test".
- In Julia, the BreuschGodfreyTest function is available in the HypothesisTests package.[10]
- In gretl, this test can be obtained via the modtest command, or under the "Test" → "Autocorrelation" menu entry in the GUI client.
See also
- Breusch–Pagan test
- Durbin–Watson test
- Ljung–Box test
- Autoregressive-moving-average model
References
- .
- JSTOR 1913829.
- ^ Macrodados 6.3 Help – Econometric Tools[permanent dead link]
- ISBN 978-0-230-27182-1.
- ^ "lmtest: Testing Linear Regression Models". CRAN.
- ISBN 978-0-387-77318-6.
- ^ "Postestimation tools for regress with time series" (PDF). Stata Manual.
- ISBN 1-59718-013-0.
- ^ Breusch-Godfrey test in Python http://statsmodels.sourceforge.net/devel/generated/statsmodels.stats.diagnostic.acorr_breush_godfrey.html?highlight=autocorrelation Archived 2014-02-28 at the Wayback Machine
- ^ "Time series tests". juliastats.org. Retrieved 2020-02-04.
Further reading
- Godfrey, L. G. (1988). Misspecification Tests in Econometrics. Cambridge, UK: Cambridge. ISBN 0-521-26616-5.
- Godfrey, L. G. (1996). "Misspecification Tests and Their Uses in Econometrics". Journal of Statistical Planning and Inference. 49 (2): 241–260. .
- Maddala, G. S.; Lahiri, Kajal (2009). Introduction to Econometrics (Fourth ed.). Chichester: Wiley. pp. 259–260.