Hi, I am running a simple linear model with (say) 5 independent variables. Is there a simple way of getting the variance-covariance matrix of the coeffcient estimates? None of the values of the lm() seem to provide this. Thanks in advance, Ritwik Sinha rsinha@darwin.cwru.edu Grad Student Case Western Reserve University [[alternative HTML version deleted]]
summary(object)$cov.unscaled
On Fri, 2 Jun 2006 18:24:57 -0300 (ADT) Rolf Turner wrote:> summary(object)$cov.unscaledAs the name suggests: this is the unscaled covariance matrix! Use the vcov() extractor method, i.e., vcov(object) which has methods not only for "lm" but also many other fitted model objects. Z
Peter Dalgaard wrote:> Rolf Turner <rolf at erdos.math.unb.ca> writes: > > > summary(object)$cov.unscaled > > You need to multiply that with sigma. However, vcov(object) is easier.Well, I thought unscaled meant unscaled --- the plain unvarnished covariance matrix! I figure that multiplying the *covariance* matrix by something would be scaling it. Silly me. Also: (a) Shouldn't that be ``multiply by sigma^2'' rather than by sigma? (b) Wouldn't it be helpful to have a pointer (``see also'') to vcov() in the help on summary.lm()? cheers, Rolf Turner rolf at math.unb.ca