[R-sig-eco] "random" lme syntax
Rafael Maia
queirozrafaelmv at yahoo.com.br
Thu Jul 17 22:29:59 CEST 2008
Hello everyone!
I am helping a friend analyze her data on the effect of helpers-at-nest
on feeding rates ("feeding") in a species of bird. Her data is as follows:
- two groups ("helpers"; helpers/no helpers)
- observations conducted at several development stages of the nestlings
("age"; repeated measures at each nest, days 1, 6 and 12)
- during 2 years ("year"; 2006/2007, as a covariate; each couple and
nest only observed during one of these years)
She's also interested in the interaction between helpers and age of the
nest Intuitively, using lme, I'd guess the formula should be:
lme(feeding~helpers*age+year, random=~1|nest_id, data=tanagers)
However, in Michael Crawley's "The R Book" example of "Mixed-Effects
models with Temporal Pseudoreplication", page 642, the explanation goes
as follows:
"Because we have a continuous random effect (weeks) we write ~week in
the random-effects formula rather than the ~1 that we used with
categorical random effects (above)."
It may be because I am not so familiarized with lme models, but this
didn't make much sense to me... Only due to the repeated measures being
continuous or categorical, I should change the syntax of which portion
of my model has random effects? If I'm measuring the same individual
through time, shouldn't that be specified on the model as an
hierarchical design (say, random=~1|nest_id/age) rather than earlier?
This got me quite confused, so any comments would be greatly appreciated...
Best,
Rafael Maia
---
"A little learning is a dangerous thing; drink deep, or taste not the
Pierian spring." (A. Pope)
M.Sc. Student
Animal Behavior Lab - Dept. of Zoology
Universidade de Brasilia, Brazil
http://www.unb.br/ib/zoo/rhmacedo/
More information about the R-sig-ecology
mailing list