Skip to content
Prev 41 / 20628 Next

extracting variance components in lme4?

On 2/5/07, Jerome Goudet <Jerome.Goudet at unil.ch> wrote:
Well vc is a list with two components named fact1 and fact2 and each
of those components is a matrix of class dpoMatrix.  If you have only
variance components (i.e. if the random effects terms in your model
formula always have the form (1|factx)) then you can extract the x
slot from those matrices.

Try

sapply(vc, slot, "x")

Be aware that this will give nonsense results if your model has random
effects for a slope as well as for an intercept.