Skip to content
Prev 106546 / 398513 Next

extend summary.lm for hccm?

On 23 December 2006 at 20:46, ivo welch wrote:
| I wonder whether it is possible to extend the summary method for the
| lm function, so that it uses an option "hccm" (well, model "hc0").  In
| my line of work, it is pretty much required in reporting of almost all
| linear regressions these days, which means that it would be very nice
| not to have to manually library car, then sqrt the diagonal, and
| recompute T-stats; instead, I would love to get everything in the same
| format as the current output---except errors heteroskedasticity
| adjusted.
| 
| easy or hard?

Did you consider the 'sandwich' package? A simple

	> install.packages("sandwich")
	> library(sandwich)
	> ?vcovHC
	> ?vcovHAC
	
should get you there.

Dirk