[R] Repeatability and lme

From: Roger Schürch <roger.schuerch_at_esh.unibe.ch>
Date: Mon 08 May 2006 - 20:12:02 EST


Dear R-help list members

I gathered longitudinal data on fish behaviour which I try to analyse using a multi level model for change. Mostly, I am following Singer & Willett (2003), who provide also the S/R code for their examples in the book (e.g. http://www.ats.ucla.edu/stat/Splus/examples/alda/ch4.htm). Of course I am interested in change over time, but I am also very much interested in consistency of behaviour of individuals, that is, does an individual for example show consistent levels of aggression and differ from others in a consistent manner. I thought that I could tackle this question using repeatability, defined as

r = sa^2 / (sa^2 + s^2)

where sa^2 is the among-groups variance component and s^2 is the within-group variance component (Lessells & Boag, 1987). Usually, repeatability is used together with one-way ANOVA, but I'd rather stick to lme. So for the introductionary example to lme in Pinheiro and Bates (2001) with Rails, I thought it would be appropriate to follow this procedure:

> library(nlme)
> fm1Rail.lme <- lme(travel ~ 1, data = Rail, random = ~ 1 | Rail)
> summary(fm1Rail.lme)

...

Random effects:
 Formula: ~1 | Rail

        (Intercept) Residual
StdDev: 24.80547 4.020779

...

> as.numeric(VarCorr(fm1Rail.lme)[1]) / (as.numeric(VarCorr(fm1Rail.lme)[1])
+ as.numeric(VarCorr(fm1Rail.lme)[2] ))
[1] 0.9743987

This gives a reasonable, high repeatability. First, I would like to know, whether this computation of repeatability is correct, and if so, how I would have to proceed if there was also a variance component for the individual change trajectory (the slope). Would sa^2 be the sum of the variance components for intercept and slope?

If my idea of analysing such kind of data is all together wrong, what alternatives do I have?

Cheers
Roger



Universität Bern
Abteilung Verhaltenökologie

Roger Schürch 

Wohlenstrasse 50A
CH-3032 Hinterkappelen
Tel. +41 (0)31 631 91 51
Fax +41 (0)31 631 91 41
http://zoology.unibe.ch/behav



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon May 08 20:31:46 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 May 2006 - 16:10:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.