In
statistics
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
, 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. In particular, it
tests
Test(s), testing, or TEST may refer to:
* Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities
Arts and entertainment
* ''Test'' (2013 film), an American film
* ''Test'' (2014 film) ...
for the presence of
serial correlation
Autocorrelation, sometimes known as serial correlation in the discrete time case, measures the correlation of a signal with a delayed copy of itself. Essentially, it quantifies the similarity between observations of a random variable at differe ...
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
A variable is considered dependent if it depends on (or is hypothesized to depend on) an independent variable. Dependent variables are studied under the supposition or demand that they depend, by some law or rule (e.g., by a mathematical function ...
are used as
independent variables
A variable is considered dependent if it depends on (or is hypothesized to depend on) an independent variable. Dependent variables are studied under the supposition or demand that they depend, by some law or rule (e.g., by a mathematical function ...
in the model's representation for later observations. This type of structure is common in
econometric models
Econometric models are statistical models used in econometrics. An econometric model specifies the statistical relationship that is believed to hold between the various economic quantities pertaining to a particular economic phenomenon. An economet ...
.
The test is named after
Trevor S. Breusch and
Leslie G. Godfrey.
Background
The Breusch–Godfrey test is a test for
autocorrelation
Autocorrelation, sometimes known as serial correlation in the discrete time case, measures the correlation of a signal with a delayed copy of itself. Essentially, it quantifies the similarity between observations of a random variable at differe ...
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
The null hypothesis (often denoted ''H''0) is the claim in scientific research that the effect being studied does not exist. The null hypothesis can also be described as the hypothesis in which no relationship exists between two sets of data o ...
is that there is no
serial correlation
Autocorrelation, sometimes known as serial correlation in the discrete time case, measures the correlation of a signal with a delayed copy of itself. Essentially, it quantifies the similarity between observations of a random variable at differe ...
of any order up to ''p''.
Because the test is based on the idea of
Lagrange multiplier testing, it is sometimes referred to as an LM test for serial correlation.
A similar assessment can be also carried out with the
Durbin–Watson test and the
Ljung–Box test
The Ljung–Box test (named for Greta M. Ljung and George E. P. Box) is a type of statistical test of whether any of a group of autocorrelations of a time series are different from zero. Instead of testing randomness at each distinct lag, it 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. The BG test has none of these restrictions, and is statistically more
powerful than Durbin's ''h'' statistic.
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
In statistics, a sequence of random variables is homoscedastic () if all its random variables have the same finite variance; this is also known as homogeneity of variance. The complementary notion is called heteroscedasticity, also known as hete ...
.
Procedure
Consider a
linear regression
In statistics, linear regression is a statistical model, model that estimates the relationship between a Scalar (mathematics), scalar response (dependent variable) and one or more explanatory variables (regressor or independent variable). A mode ...
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
In statistics, ordinary least squares (OLS) is a type of linear least squares method for choosing the unknown parameters in a linear regression
In statistics, linear regression is a statistical model, model that estimates the relationship ...
to obtain a set of sample residuals
.
Breusch and Godfrey proved that, if the following auxiliary regression model is fitted
:
and if the usual
Coefficient of determination
In statistics, the coefficient of determination, denoted ''R''2 or ''r''2 and pronounced "R squared", is the proportion of the variation in the dependent variable that is predictable from the independent variable(s).
It is a statistic used in t ...
(
statistic) is calculated for this model:
:
,
where
stands for the
arithmetic mean
In mathematics and statistics, the arithmetic mean ( ), arithmetic average, or just the ''mean'' or ''average'' is the sum of a collection of numbers divided by the count of numbers in the collection. The collection is often a set of results fr ...
of residuals.
One may average residuals over the last
observations, where
is the number of observations in the original model and
is the number of error lags used in the auxiliary regression.
There is a version of the test where missing residuals
are replaced by zeros.
In this version of the test the number of observations in the auxiliary regression
is equal to the original number of observations
.
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'').
Software
* In
R, this test is performed by function bgtest, available in
package lmtest.
* In
Stata
Stata (, , alternatively , occasionally stylized as STATA) is a general-purpose Statistics, statistical software package developed by StataCorp for data manipulation, visualization, statistics, and automated reporting. It is used by researchers ...
, this test is performed by the command estat bgodfrey, and by varlmar for
vector autoregressions.
* In
SAS, the GODFREY option of the MODEL statement in PROC AUTOREG provides a version of this test.
* In
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (prog ...
Statsmodels, the acorr_breusch_godfrey function in the module statsmodels.stats.diagnostic
* In
EViews
EViews is a statistical package for Windows, used mainly for time-series oriented econometric analysis. It is developed by Quantitative Micro Software (QMS), now a part of IHS. Version 1.0 was released in March 1994, and replaced MicroTSP. T ...
, this test is already done after a regression, at "View" → "Residual Diagnostics" → "Serial Correlation LM Test".
* In
Julia
Julia may refer to:
People
*Julia (given name), including a list of people with the name
*Julia (surname), including a list of people with the name
*Julia gens, a patrician family of Ancient Rome
*Julia (clairvoyant) (fl. 1689), lady's maid of Qu ...
, the ''BreuschGodfreyTest'' function is available in the ''HypothesisTests'' package.
* In
gretl
gretl is an open-source statistical package, mainly for econometrics. The name is an acronym for ''G''nu ''R''egression, ''E''conometrics and ''T''ime-series ''L''ibrary.
It has both a graphical user interface (GUI) and a command-line interf ...
, 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
The Ljung–Box test (named for Greta M. Ljung and George E. P. Box) is a type of statistical test of whether any of a group of autocorrelations of a time series are different from zero. Instead of testing randomness at each distinct lag, it test ...
*
Autoregressive-moving-average model
References
Further reading
*
*
*
{{DEFAULTSORT:Breusch-Godfrey Test
Statistical tests
Regression diagnostics
Regression with time series structure