Breusch–Godfrey test
In statistics, the Breusch–Godfrey test is used to assess the validity of some of the modelling assumptions inherent in applying regression-like models to observed data series.[1][2] In particular, it tests for the presence of serial correlation that has not been included in a proposed model structure and which, if present, would mean that incorrect conclusions would be drawn from other tests or that sub-optimal estimates of model parameters would be obtained.
The regression models to which the test can be applied include cases where lagged values of the dependent variables are used as independent variables in the model's representation for later observations. This type of structure is common in econometric models.
The test is named after Trevor S. Breusch and Leslie G. Godfrey.
Background
The Breusch–Godfrey test is a test for autocorrelation in the errors in a regression model. It makes use of the residuals from the model being considered in a regression analysis, and a test statistic is derived from these. The null hypothesis is that there is no serial correlation of any order up to p.[3]
Because the test is based on the idea of Lagrange multiplier testing, it is sometimes referred to as an LM test for serial correlation.[4]
A similar assessment can be also carried out with the Durbin–Watson test and the Ljung–Box test. However, the test is more general than that using the Durbin–Watson statistic (or Durbin's h statistic), which is only valid for nonstochastic regressors and for testing the possibility of a first-order autoregressive model (e.g. AR(1)) for the regression errors.[citation needed] The BG test has none of these restrictions, and is statistically more powerful than Durbin's h statistic.[citation needed] The BG test is considered to be more general than the Ljung-Box test because the latter requires the assumption of strict exogeneity, but the BG test does not. However, the BG test requires the assumptions of stronger forms of predeterminedness and conditional homoscedasticity.
Procedure
Consider a linear regression of any form, for example
- [math]\displaystyle{ Y_t = \beta_1+ \beta_2 X_{t,1} + \beta_3 X_{t,2} + u_t \, }[/math]
where the errors might follow an AR(p) autoregressive scheme, as follows:
- [math]\displaystyle{ u_t = \rho_1 u_{t-1} + \rho_2 u_{t-2} + \cdots + \rho_p u_{t-p} + \varepsilon_t. \, }[/math]
The simple regression model is first fitted by ordinary least squares to obtain a set of sample residuals [math]\displaystyle{ \hat{u}_t }[/math].
Breusch and Godfrey proved that, if the following auxiliary regression model is fitted
- [math]\displaystyle{ \hat{u}_t = \alpha_0 + \alpha_1 X_{t,1} + \alpha_2 X_{t,2} + \rho_1 \hat{u}_{t-1} + \rho_2 \hat{u}_{t-2} + \cdots + \rho_p \hat{u}_{t-p} + \varepsilon_t \, }[/math]
and if the usual Coefficient of determination ([math]\displaystyle{ R^2 }[/math] statistic) is calculated for this model:
- [math]\displaystyle{ R^2 := \frac{\sum_{j=1}^{T-p} (u_{T-j} - \hat{u}_{T-j})^2}{\sum_{j=1}^{T-p} (u_{T-j} - \bar{u})^2} }[/math],
where [math]\displaystyle{ \bar{u} }[/math] stands for the arithmetic mean over the last [math]\displaystyle{ n=T-p }[/math] samples, where [math]\displaystyle{ T }[/math] is the total number of observations and [math]\displaystyle{ p }[/math] 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:
- [math]\displaystyle{ n R^2\,\sim\,\chi^2_p, \, }[/math]
when the null hypothesis [math]\displaystyle{ {H_0: \lbrace \rho_i = 0 \text{ for all } i \rbrace } }[/math] 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
- ↑ Breusch, T. S. (1978). "Testing for Autocorrelation in Dynamic Linear Models". Australian Economic Papers 17: 334–355. doi:10.1111/j.1467-8454.1978.tb00635.x.
- ↑ Godfrey, L. G. (1978). "Testing Against General Autoregressive and Moving Average Error Models when the Regressors Include Lagged Dependent Variables". Econometrica 46: 1293–1301.
- ↑ Macrodados 6.3 Help – Econometric Tools[yes|permanent dead link|dead link}}]
- ↑ Asteriou, Dimitrios; Hall, Stephen G. (2011). "The Breusch–Godfrey LM test for serial correlation". Applied Econometrics (Second ed.). New York: Palgrave Macmillan. pp. 159–61. ISBN 978-0-230-27182-1. https://books.google.com/books?id=6qYcBQAAQBAJ&pg=PA159.
- ↑ "lmtest: Testing Linear Regression Models". CRAN. https://cran.r-project.org/web/packages/lmtest/index.html.
- ↑ Kleiber, Christian; Zeileis, Achim (2008). "Testing for autocorrelation". Applied Econometrics with R. New York: Springer. pp. 104–106. ISBN 978-0-387-77318-6. https://books.google.com/books?id=86rWI7WzFScC&pg=PA104.
- ↑ "Postestimation tools for regress with time series". Stata Manual. https://www.stata.com/manuals/rregresspostestimationtimeseries.pdf.
- ↑ Baum, Christopher F. (2006). "Testing for serial correlation". An Introduction to Modern Econometrics Using Stata. Stata Press. pp. 155–158. ISBN 1-59718-013-0. https://books.google.com/books?id=zCym0GtuRE4C&pg=PA155.
- ↑ Breusch-Godfrey test in Python http://statsmodels.sourceforge.net/devel/generated/statsmodels.stats.diagnostic.acorr_breush_godfrey.html?highlight=autocorrelation
- ↑ "Time series tests". https://juliastats.org/HypothesisTests.jl/latest/time_series/.
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. doi:10.1016/0378-3758(95)00039-9.
- Maddala, G. S.; Lahiri, Kajal (2009). Introduction to Econometrics (Fourth ed.). Chichester: Wiley. pp. 259–260.
Original source: https://en.wikipedia.org/wiki/Breusch–Godfrey test.
Read more |