Skip to content
Prev 11850 / 20628 Next

extract specific values from lmer summary

On 14-05-02 03:53 PM, Laura Prugh wrote:
This is really more of an r-sig-mixed-models at r-project.org question:
I'm forwarding the answer there.

  methods(class="merMod") is a good way to check the available accessor
methods for (g)lmer fits, as is ?getME (an lme4-specific function for
getting at lower-level components of a (g)lmer fit in a safe/stable way).
A reproducible example would be slightly better, but here I believe
you're looking for

  fixef(lmer.sheep)[1]  ## intercept
  sqrt(unlist(VarCorr(lmer.sheep))  ## std dev of year effect

  It looks like you're still using an older version of lme4: I believe
the incantations I gave above are backward compatible, but there are a
fair number of convenience methods in the newer (>1.0) version that
might be helpful (e.g. as.data.frame(VarCorr(lmer.sheep)))

  Ben Bolker