[R] Extracting SD of random effects from lme object

Ben Domingue ben.domingue at gmail.com
Mon Mar 23 18:26:15 CET 2009


Hello,
How do I get the standard deviations for the random effects out of the
lme object?  I feel like there's probably a simple way of doing this,
but I can't see it.  Using the first example from the documentation:

> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
> fm1
Linear mixed-effects model fit by REML
  Data: Orthodont
  Log-restricted-likelihood: -221.3183
  Fixed: distance ~ age
(Intercept)         age
 16.7611111   0.6601852

Random effects:
 Formula: ~age | Subject
 Structure: General positive-definite
            StdDev    Corr
(Intercept) 2.3270339 (Intr)
age         0.2264276 -0.609
Residual    1.3100399

Number of Observations: 108
Number of Groups: 27

I want to extract the column vector (2.3270339, 0.2264276,
1.3100399)'.  Any thoughts?
Thanks,
Ben




More information about the R-help mailing list