Skip to content
Prev 359803 / 398503 Next

Test for Homoscedesticity in R Without BP Test

On Mon, 4 Apr 2016, varin sacha via R-help wrote:

            
The White test is a special case of the Breusch-Pagan test using a 
particular specification of the auxiliary regressors: namely all 
regressors, their squares and their cross-products. As this specification 
makes only sense if all regressors are continuous, many implementations 
have problems if there are already dummy variables, interactions, etc. in 
the regressor matrix. This is also the reason why bptest() from "lmtest" 
uses a different specification by default. However, you can utilize the 
function to carry out the White test as illustrated in:

example("CigarettesB", package = "AER")

(Of course, the AER package needs to be installed first.)
That package is no longer on CRAN as it took the code from bptest() 
without crediting its original authors and released it in a package that 
conflicted with the original license. Also, the implementation did not 
check for potential problems with dummy variables or interactions 
mentioned above.

So the bptest() implementation from "lmtest" is really recommend. Or 
alternatively ncvTest() from package "car".