I think there are a few approaches. I haven't looked at them all and not sure which is the best:
The sandwich package:
library(sandwich)
coeftest(model, vcov=sandwich)
But this doesn't give me the same answers I get from Stata for some reason. I've never tried to work out why, I just don't use this package.
The rms package: I find this a bit of a pain to work with but usually get good answers with some effort. And it is the most useful for me.
model = ols(a~b, x=TRUE)
robcov(model)
You can code it from scratch (see this blog post). It looks like the most painful option, but remarkably easy and this option often works the best.
A simple / quick explanation is that Huber-White or Robust SE are derived from the data rather than from the model, and thus are robust to many model assumptions. But as always, a quick Google search will lay this out in excruciating detail if you're interested.
aov(.)function? And how robust will my regression be? Again thanks a lot for your help! – Remi.b Nov 19 '13 at 12:03coeftest&waldtestfunctions usingvcov=from thelmtestlibrary (I'm sure there are others as well). – Scortchi - Reinstate Monica Nov 19 '13 at 12:06coeftest(myModel, vcov=sandwich(myModel)). And how can I now know whether my regression still suffers of heteroscedasticity? – Remi.b Nov 19 '13 at 12:22