[R] lme: extract variance estimate
Douglas Bates
bates at stat.wisc.edu
Fri Jul 9 03:18:13 CEST 2004
I'm actually replying to Stephen's message but I had already deleted it
before I read Spencer's message. (I'm on a slow connection and I am
simultaneously downloading a big file so I am trying to optimize
bandwidth, sometimes with unfortunate results.)
In the previous message the author showed the slots u at scale (a numeric
scalar), u at reSumry (a list of corrmatrix objects), and u at useScale
(logical). The quantity that you are looking for is calculated as
unlist(lapply(u at reSumry, function(x, scal) scal*x at stdDev,
scal = ifelse(u at useScale, u at scale, 1.)))
plus-or-minus a parenthesis or two.
The reSumry contains the relative variance-covariance matrices in the
form of correlations and standard deviations. Some models, such as lme
models, use a scale parameter. Others, such as binomial generalized
linear mixed models, do not. That is why the estimate of the scale
parameter is stored separately along with a flag indicating whether
scaling should be used.
More information about the R-help
mailing list