Skip to content
Prev 109949 / 398500 Next

applying lm on an array of observations with common design matrix

Ranjan Maitra napsal(a):
Sure:

lapply(summary(fit), function(x) {"$"(x,cov.unscaled)})

Add indexing if you do not want the whole matrix. You can extract 
whatever you want, just take a look at ?summary.lm, section Value.
Petr