example(columbus)
error.col <- errorsarlm(CRIME ~ HOVAL + INC, data=columbus,
nb2listw(col.gal.nb))
bptest.sarlm(error.col)
bptest.sarlm(error.col, studentize=FALSE)
if (require(lmtest) && require(sandwich)) {
coeftest(error.col$lm.target, vcov=vcovHC(error.col$lm.target,
type="HC0"), df=Inf)
}
Run the code above in your browser using DataLab