[R] lme: extract variance estimate
spe2 at cornell.edu
Wed Jul 7 21:26:41 CEST 2004
Spencer Graves wrote:
> Have you considered "VarCorr"? I've used it with "lme", and the
>documentation in package lme4 suggests it should work with GLMM, which
>might also do what you want from glmmPQL.
Thanks for the pointer (I was not aware that nlme and lme4 had different
versions of lme), but I'm still stuck at the same place using lme4:> VarCorr(fit)
Groups Name Variance Std.Dev.
yeart (Intercept) 0.040896 0.20223
Residual 0.091125 0.30187
The number I need to extract and store is the .20223, but all the
components I can find in VarCorr(fit) are something else.
 "scale" "reSumry" "useScale"
> u at scale
> u at reSumry
An object of class "corrmatrix"
> u at useScale
In glmmML the estimate is returned as the $sigma component
of the model, but I also need the same info from 'family=gaussian'
Stephen P. Ellner (spe2 at cornell.edu)
Department of Ecology and Evolutionary Biology
Corson Hall, Cornell University, Ithaca NY 14853-2701
Phone (607) 254-4221 FAX (607) 255-8088
More information about the R-help