[R] Extracting variance components in lme

Murray Jorgensen maj at stats.waikato.ac.nz
Thu Nov 3 01:02:18 CET 2005


Consider the output for the inroductory "Rail" example in "Mixed Effects 
Models in S and S-PLUS" by Pinheiro and Bates:

 > summary(fm1Rail.lme)
Linear mixed-effects model fit by REML
  Data: Rail
       AIC      BIC   logLik
   128.177 130.6766 -61.0885

Random effects:
  Formula: ~1 | Rail
         (Intercept) Residual
StdDev:    24.80547 4.020779

Fixed effects: travel ~ 1
             Value Std.Error DF  t-value p-value
(Intercept)  66.5  10.17104 12 6.538173       0

Standardized Within-Group Residuals:
         Min          Q1         Med          Q3         Max
-1.61882658 -0.28217671  0.03569328  0.21955784  1.61437744

Number of Observations: 18
Number of Groups: 6


I want to extract the variance components  sigma = 4.020779 (the within 
component) and sigma_b = 24.80547 (the between component).

I can get sigma easily:
sigma <-  fm1Rail.lme$sigma

but how can I get sigma_b ?

Cheers,  Murray Jorgensen

-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    Home +64 7 825 0441    Mobile 021 1395 862




More information about the R-help mailing list