# Breusch–Pagan test

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
(Learn how and when to remove this template message) |

In statistics, the **Breusch–Pagan test**, developed in 1979 by Trevor Breusch and Adrian Pagan,^{[1]} is used to test for heteroskedasticity in a linear regression model. It was independently suggested with some extension by R. Dennis Cook and Sanford Weisberg in 1983.^{[2]} It tests whether the variance of the errors from a regression is dependent on the values of the independent variables. In that case, heteroskedasticity is present.

Suppose that we estimate the regression model

and obtain from this fitted model a set of values for , the residuals. Ordinary least squares constrains these so that their mean is 0 and so, given the assumption that their variance does not depend on the independent variables, an estimate of this variance can be obtained from the average of the squared values of the residuals. If the assumption is not held to be true, a simple model might be that the variance is linearly related to independent variables; such a model can be examined by regressing the squared residuals on the independent variables, using an auxiliary regression equation of the form

This is the basis of the Breusch–Pagan test, it is a chi-squared test: the test statistic is distributed *nχ*^{2} with *k* degrees of freedom. If the test statistic has a p-value below an appropriate threshold (e.g. *p* < 0.05) then the null hypothesis of homoskedasticity is rejected and heteroskedasticity assumed.

If the Breusch–Pagan test shows that there is conditional heteroskedasticity, one could either use weighted least squares (if the source of heteroskedasticity is known) or use heteroscedasticity-consistent standard errors.

## Procedure[edit]

Under the classical assumptions, ordinary least squares is the best linear unbiased estimator (BLUE), i.e., it is unbiased and efficient. It remains unbiased under heteroskedasticity, but efficiency is lost. Before deciding upon an estimation method, one may conduct the Breusch–Pagan test to examine the presence of heteroskedasticity; the Breusch–Pagan test is based on models of the type for the variances of the observations where explain the difference in the variances. The null hypothesis is equivalent to the parameter restrictions:

The following Lagrange multiplier (LM) yields the test statistic for the Breusch–Pagan test:^{[citation needed]}

This test is analogous to following the simple three-step procedure:^{[3]}

*Step 1*: Apply OLS in the model

and compute the regression residuals.

*Step 2*: Perform the auxiliary regression

Always, *z* could be partly replaced by independent variables *x*.

*Step 3*: The test statistic is the result of the coefficient of determination of the auxiliary regression in Step 2 and sample size with:

The test statistic is asymptotically distributed as under the null hypothesis of homoskedasticity.^{[4]}

## Software[edit]

In R, this test is performed by the function **ncvTest** available in the **car** package,^{[5]} the function **bptest** available in the **lmtest** package,^{[6]}^{[7]} or the function **plmtest** available in the **plm** package.^{[8]}

In Stata, one specifies the full regression, and then enters the command `estat hettest`

followed by all independent variables.^{[9]}^{[10]}

In SAS, Breusch–Pagan can be obtained using the Proc Model option.

In Python, there is a method het_breuschpagan in statsmodels.stats.diagnostic (the statsmodels package) for Breusch–Pagan test.^{[11]}

## See also[edit]

## References[edit]

**^**Breusch, T. S.; Pagan, A. R. (1979). "A Simple Test for Heteroskedasticity and Random Coefficient Variation".*Econometrica*.**47**(5): 1287–1294. doi:10.2307/1911963. JSTOR 1911963. MR 0545960.**^**Cook, R. D.; Weisberg, S. (1983). "Diagnostics for Heteroskedasticity in Regression".*Biometrika*.**70**(1): 1–10. doi:10.1093/biomet/70.1.1.**^**Koenker, R. (1981). "A note on studentizing a test for heteroskedasticity".*Journal of Econometrics*.**17**(1): 107–112. doi:10.1016/0304-4076(81)90062-2.**^**Wooldridge, Jeffrey M. (2013).*Introductory Econometrics: A Modern Approach*(Fifth ed.). South-Western. p. 267. ISBN 978-1-111-53439-4.**^**MRAN: ncvTest {car}**^**R documentation about bptest**^**Kleiber, Christian; Zeileis, Achim (2008).*Applied Econometrics with R*. New York: Springer. pp. 101–102. ISBN 978-0-387-77316-2.**^**MRAN: plmtest {plm}**^**"regress postestimation — Postestimation tools for regress" (PDF).*Stata Manual*.**^**Cameron, A. Colin; Trivedi, Pravin K. (2010).*Microeconometrics Using Stata*(Revised ed.). Stata Press. p. 97 – via Google Books.**^**"statsmodels.stats.diagnostic.het_breuschpagan — statsmodels 0.8.0 documentation".*www.statsmodels.org*. Retrieved 2017-11-16.

## Further reading[edit]

- Gujarati, Damodar N.; Porter, Dawn C. (2009).
*Basic Econometrics*(Fifth ed.). New York: McGraw-Hill Irwin. pp. 385–86. ISBN 978-0-07-337577-9. - Kmenta, Jan (1986).
*Elements of Econometrics*(Second ed.). New York: Macmillan. pp. 292–298. ISBN 0-02-365070-2. - Krämer, W.; Sonnberger, H. (1986).
*The Linear Regression Model under Test*. Heidelberg: Physica. - Maddala, G. S.; Lahiri, Kajal (2009).
*Introduction to Econometrics*(Fourth ed.). Chichester: Wiley. pp. 216–218. ISBN 978-0-470-01512-4.