[R] random effects in lme

Lorenz.Gygax@fat.admin.ch Lorenz.Gygax at fat.admin.ch
Thu Feb 3 07:52:30 CET 2005


It is unlikely that your request will be answered faster if you post it  a
second time in exactly the same way ...

> 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?

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

What is wrong with an estimted StdDev on the level of plotcode of 0.0418 and
on the level of treatment (which is actually the same as to say that this is
a block of plants within plotcode that received the same treatment?) of
0.087?

> (2) How can I test the significance of the variance components?

Calculate a model with an without the component of interest and compare the
models using anova().

Perhaps you should read Pinheiro & Bates (2000)?

> (3) Is there something like an "r squared" for the whole 
> model which I can state?

None is provided and I do not know how easily it could be calculated. But
the use of the measure can be questioned. It is an absolute measure on how
much of the variability in the data is explained. Imagine you had true
replicates (i.e. several measurements under absolutely identical
situations). Imagine further that these measurements do nevertheless show
some variability. If this variability was substantial, your r-squared would
be low even though your model might pick up all the structure that you can
find in the data. Thus you can only get as good as 'natural' variability in
your data which is not considered by the r-squared measure.

Thus, (corrected) r-squared values might tell you something if you compare
different models based on the same data (in a similar way as the AIC and BIC
criteria) but not if you compare completely different data sets.

Regards, Lorenz
- 
Lorenz Gygax, Dr. sc. nat.
Centre for proper housing of ruminants and pigs
Swiss Federal Veterinary Office
agroscope FAT Tänikon, CH-8356 Ettenhausen / Switzerland




More information about the R-help mailing list