The Breusch-Pagan test is a test for heteroscedasticity in the linear model. Under the null hypothesis the model is homoscedastic.
The Breusch-Pagan test was developed in 1979 by Andre Breusch und Trevor Pagan. It consists of three steps:
- Estimate the model by OLS and obtain its residuals.
- Estimate an auxiliary regression of squared residuals on independent variables.
- The test statistic is the product of the coefficient of determination of the auxiliary regression in Step 2 and sample size $n$: $LM = n R^2$.
Software implementations:
- In
R
,ncvTest
available in thecar
package,bptest
available in thelmtest
package,plmtest
available in theplm
package - In
Stata
, one specifies the full regression, and then enters the commandestat hettest
followed by all independent variables - In
SAS
, use theProc Model
option - In
Python
, methodhet_breushpagan
instatsmodels.stats.diagnostic
(the statsmodels package)