[R] random effects in lme

Christoph Scherber Christoph.Scherber at uni-jena.de
Wed Feb 2 17:24:41 CET 2005


Dear all,

Suppose I have a linear mixed-effects model (from the package nlme) with 
nested random effects (see below); how would I present the results from 
the random effects part in a publication?

Specifically, I´d like to know:
(1) What is the total variance of the random effects at each level?
(2) How can I test the significance of the variance components?
(3) Is there something like an "r squared" for the whole model which I 
can state?

The data come from an experiment on plant performance with and without 
insecticide, with and without grasses present, and across different 
levels of plant diversity ("div").

Thanks for your help!
Christoph.

lme(asin(sqrt(response)) ~ treatment + logb(div + 1, 2) + grass,
random =  ~ 1 | plotcode/treatment, na.action = na.exclude, method = "ML")

Linear mixed-effects model fit by maximum likelihood

Data: NULL
       AIC      BIC  logLik
 -290.4181 -268.719 152.209

Random effects:
Formula:  ~ 1 | plotcode
       (Intercept)
StdDev:  0.04176364

 Formula:  ~ 1 | treatment %in% plotcode
      (Intercept)   Residual
StdDev:  0.08660458 0.00833387

Fixed effects: asin(sqrt(response)) ~ treatment + logb(div + 1, 2) + grass
                   Value  Std.Error DF   t-value p-value
   (Intercept)  0.1858065 0.01858581 81  9.997225  <.0001
     treatment  0.0201384 0.00687832 81  2.927803  0.0044
logb(div + 1, 2) -0.0203301 0.00690074 79 -2.946073  0.0042
         grass  0.0428934 0.01802506 79  2.379656  0.0197

Standardized Within-Group Residuals:
      Min          Q1         Med         Q3       Max
-0.2033155 -0.05739679 -0.00943737 0.04045958 0.3637217

Number of Observations: 164
Number of Groups:
plotcode ansatz %in% plotcode
     82                  164




More information about the R-help mailing list