In statistics, the Breusch–Pagan test, developed in 1979 by Trevor Breusch and Adrian Pagan, 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. 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.
Contents
Suppose that we estimate the regression model
and obtain from this fitted model a set of values for
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
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
The following Lagrange multiplier (LM) yields the test statistic for the Breusch–Pagan test:
This test is analogous to following the simple three-step procedure:
and compute the regression residuals.
Always, z could be partly replaced by independent variables x.
The test statistic is asymptotically distributed as
Software
In R, this test is performed by the function ncvTest available in the car package, the function bptest available in the lmtest package, or the function plmtest available in the plm package.
In Stata, one specifies the full regression, and then enters the command estat hettest
followed by all independent variables.
In SAS, Breusch–Pagan can be obtained using the Proc Model option.
In Python, there is a method het_breushpagan in statsmodels.stats.diagnostic (the statsmodels package) for Breusch–Pagan test.