[R] Linear mixed effects model ?
Daniel Perkins
d.m.perkins at qmul.ac.uk
Tue Oct 6 14:34:31 CEST 2009
I am looking for some advice on an appropriate statistical analysis in R
*Experimental question* : We are interested in how communities from
different streams may vary in their response to experimental
temperature. Specifically we are interested to test for differences in
the slope and intercept of the relationship between temperature and
oxygen consumption between the different stream communities.
*Outline of experiment*
There were four streams and from each we took samples which had a
characteristic community of organisms. These four different communities
are labelled “S1,.. S4.
Each ‘Stream’ was incubated together in the same water bath at six
temperatures in succession, giving covariates (~ 5,10,15,20,25,and 30°C)
to the factor “Temp”.
However this also meant six repeated measures were made on the same
‘Stream’ over time. As time between incubations varied ‘Time’ is given a
categorical label a,....f.
This procedure was repeated four times using different samples from the
same streams, thus giving ‘Replicates’ labelled 1,...4. Each ‘Replicate’
had different temperature values but always six values in total.
The response variable measured in all 96 incubations, was the rate at
which the communities consumed oxygen over a given time in incubation:
‘Rate’
Some incubation’s were excluded (5 from 96)
*Models*
Ideally we would do an ANCOVA to test for differences in slope or
intercepts for the different streams. However as there were repeated
measures and unequal n and unbalanced design, I have used a linear mixed
effect model (from nlme package in R) in the form:
model <- lme (Rate ~ Temp* Stream, random = ~ Time|Replicate)
*Question* : Do these models appropriately account for the temporal /
spatial pseudoreplication in the experimental design ?
Many thanks in advance
Daniel
More information about the R-help
mailing list