[R] cov.unscaled in gls object

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 14 10:46:20 CEST 2007


This is what the vcov() generic is for.  You are asking for internal 
details from a different class ("summary.lm").

On Tue, 14 Aug 2007, Sven Garbade wrote:

> Hi list,
>
> can I extract the cov.unscaled ("the unscaled covariance matrix") from a
> gls fit (package nlme), like with summary.lm? Background: In a fixed
> effect meta analysis regression the standard errors of the coefficients
> can be computed as sqrt(diag(cov.unscaled)) where cov.unscaled is
> (X'WX). I try do do this with a gls-fit.

I don't think so: the 'unscaled' is a clue.  The vcov method is

> stats:::vcov.lm
function (object, ...)
{
     so <- summary.lm(object, corr = FALSE)
     so$sigma^2 * so$cov.unscaled
}

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list