fbpx
Wikipedia

Breusch–Pagan test

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 (Cook–Weisberg test).[2] Derived from the Lagrange multiplier test principle, 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 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 can be implemented via the following three-step procedure:

  • Step 1: Apply OLS in the model
 
  • Step 2: Compute the regression residuals,  , square them, and divide by the Maximum Likelihood estimate of the error variance from the Step 1 regression, to obtain what Breusch and Pagan call  :
 
  • Step 2: Estimate the auxiliary regression
 

where the z terms will typically but not necessarily be the same as the original covariates x.

  • Step 3: The LM test statistic is then half of the explained sum of squares from the auxiliary regression in Step 2:
 

where TSS is the sum of squared deviations of the   from their mean of 1, and SSR is the sum of squared residuals from the auxiliary regression. The test statistic is asymptotically distributed as   under the null hypothesis of homoskedasticity and normally distributed  , as proved by Breusch and Pagan in their 1979 paper.

Robust variant edit

A variant of this test, robust in the case of a non-Gaussian error term, was proposed by Roger Koenker.[3] In this variant, the dependent variable in the auxiliary regression is just the squared residual from the Step 1 regression,  , and the test statistic is   from the auxiliary regression. As Koenker notes (1981, page 111), while the revised statistic has correct asymptotic size its power "may be quite poor except under idealized Gaussian conditions."

Software edit

In R, this test is performed by the function ncvTest available in the car package,[4] the function bptest available in the lmtest package,[5][6] the function plmtest available in the plm package,[7] or the function breusch_pagan available in the skedastic 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]

In gretl, the command modtest --breusch-pagan can be applied following an OLS regression.

See also edit

References edit

  1. ^ 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.
  2. ^ Cook, R. D.; Weisberg, S. (1983). "Diagnostics for Heteroskedasticity in Regression". Biometrika. 70 (1): 1–10. doi:10.1093/biomet/70.1.1. hdl:11299/199411.
  3. ^ Koenker, Roger (1981). "A Note on Studentizing a Test for Heteroscedasticity". Journal of Econometrics. 17: 107–112. doi:10.1016/0304-4076(81)90062-2.
  4. ^ MRAN: ncvTest {car}
  5. ^ R documentation about bptest
  6. ^ Kleiber, Christian; Zeileis, Achim (2008). Applied Econometrics with R. New York: Springer. pp. 101–102. ISBN 978-0-387-77316-2.
  7. ^ MRAN: plmtest {plm}
  8. ^ "skedastic: Heteroskedasticity Diagnostics for Linear Regression Models".
  9. ^ "regress postestimation — Postestimation tools for regress" (PDF). Stata Manual.
  10. ^ Cameron, A. Colin; Trivedi, Pravin K. (2010). Microeconometrics Using Stata (Revised ed.). Stata Press. p. 97. ISBN 9781597180481 – via Google Books.
  11. ^ "statsmodels.stats.diagnostic.het_breuschpagan — statsmodels 0.8.0 documentation". www.statsmodels.org. Retrieved 2017-11-16.

Further reading edit

breusch, pagan, test, this, article, includes, list, references, related, reading, external, links, sources, remain, unclear, because, lacks, inline, citations, please, help, improve, this, article, introducing, more, precise, citations, june, 2012, learn, whe. This article includes a list of references related reading or external links but its sources remain unclear because it lacks inline citations Please help improve this article by introducing more precise citations June 2012 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 Cook Weisberg test 2 Derived from the Lagrange multiplier test principle 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 y b0 b1x u displaystyle y beta 0 beta 1 x u and obtain from this fitted model a set of values for u displaystyle widehat u 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 u 2 g0 g1x v displaystyle widehat u 2 gamma 0 gamma 1 x v This is the basis of the Breusch Pagan test It is a chi squared test the test statistic is distributed nx2 with k degrees of freedom If the test statistic has a p value below an appropriate threshold e g p lt 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 Contents 1 Procedure 2 Robust variant 3 Software 4 See also 5 References 6 Further readingProcedure editUnder 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 si2 h zi g displaystyle sigma i 2 h z i gamma nbsp for the variances of the observations where zi 1 z2i zpi displaystyle z i 1 z 2i ldots z pi nbsp explain the difference in the variances The null hypothesis is equivalent to the p 1 displaystyle p 1 nbsp parameter restrictions g2 gp 0 displaystyle gamma 2 cdots gamma p 0 nbsp The following Lagrange multiplier LM yields the test statistic for the Breusch Pagan test citation needed LM ℓ 8 T E 2ℓ 8 8 1 ℓ 8 displaystyle text LM left frac partial ell partial theta right mathsf T left E left frac partial 2 ell partial theta partial theta right right 1 left frac partial ell partial theta right nbsp This test can be implemented via the following three step procedure Step 1 Apply OLS in the modelyi Xib ei i 1 n displaystyle y i X i beta varepsilon i quad i 1 dots n nbsp dd Step 2 Compute the regression residuals e i displaystyle hat varepsilon i nbsp square them and divide by the Maximum Likelihood estimate of the error variance from the Step 1 regression to obtain what Breusch and Pagan call gi displaystyle g i nbsp gi e i2 s 2 s 2 e i2 n displaystyle g i hat varepsilon i 2 hat sigma 2 quad hat sigma 2 sum hat varepsilon i 2 n nbsp dd Step 2 Estimate the auxiliary regressiongi g1 g2z2i gpzpi hi displaystyle g i gamma 1 gamma 2 z 2i cdots gamma p z pi eta i nbsp dd where the z terms will typically but not necessarily be the same as the original covariates x Step 3 The LM test statistic is then half of the explained sum of squares from the auxiliary regression in Step 2 LM 12 TSS SSR displaystyle text LM frac 1 2 left text TSS text SSR right nbsp dd where TSS is the sum of squared deviations of the gi displaystyle g i nbsp from their mean of 1 and SSR is the sum of squared residuals from the auxiliary regression The test statistic is asymptotically distributed as xp 12 displaystyle chi p 1 2 nbsp under the null hypothesis of homoskedasticity and normally distributed ei displaystyle varepsilon i nbsp as proved by Breusch and Pagan in their 1979 paper Robust variant editA variant of this test robust in the case of a non Gaussian error term was proposed by Roger Koenker 3 In this variant the dependent variable in the auxiliary regression is just the squared residual from the Step 1 regression e i2 displaystyle hat varepsilon i 2 nbsp and the test statistic is nR2 displaystyle nR 2 nbsp from the auxiliary regression As Koenker notes 1981 page 111 while the revised statistic has correct asymptotic size its power may be quite poor except under idealized Gaussian conditions Software editIn R this test is performed by the function ncvTest available in the car package 4 the function bptest available in the lmtest package 5 6 the function plmtest available in the plm package 7 or the function breusch pagan available in the skedastic 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 In gretl the command modtest breusch pagan can be applied following an OLS regression See also editGlejser test Goldfeld Quandt test Park test White testReferences 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 hdl 11299 199411 Koenker Roger 1981 A Note on Studentizing a Test for Heteroscedasticity Journal of Econometrics 17 107 112 doi 10 1016 0304 4076 81 90062 2 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 skedastic Heteroskedasticity Diagnostics for Linear Regression Models 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 ISBN 9781597180481 via Google Books statsmodels stats diagnostic het breuschpagan statsmodels 0 8 0 documentation www statsmodels org Retrieved 2017 11 16 Further reading editGujarati 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 Kramer W Sonnberger H 1986 The Linear Regression Model under Test Heidelberg Physica pp 32 39 ISBN 9783642958762 Maddala G S Lahiri Kajal 2009 Introduction to Econometrics Fourth ed Chichester Wiley pp 216 218 ISBN 978 0 470 01512 4 Retrieved from https en wikipedia org w index php title Breusch Pagan test amp oldid 1176713923, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.