## BP test with Koenker's studentized residuals
X <- bp.test(wage ~ educ + age, data = data.wage, koenker = FALSE)
X
## A white test for the same model (auxiliary regression specified by \code{varmod})
bp.test(wage ~ educ + age, varmod = ~ (educ + age)^2 + I(educ^2) + I(age^2), data = data.wage)
## Similar test
wh.test(wage ~ educ + age, data = data.wage)
## Plot the test result
plot(X)
Run the code above in your browser using DataLab