[R] help: advice on the structuring of ReML models for analysing growth curves
Andrew Robinson
A.Robinson at ms.unimelb.edu.au
Tue Sep 5 16:25:22 CEST 2006
Hi Simon,
overall I think that lmer is a good tool for this problem. It's
impossible to reply definitively without the full details on the
experimental design.
Caveat in place, I have questions and some suggestions. Are
treatment1 and treatment2 distinct factors, or two levels of a
treatment, the dietary compound? Also, what is broodsize?
If you want to nest chick id within brood, I think that you should
include the interaction as a random factor. If you'd like the age
effects to differ between chicks then age should be on the left of id.
Thus, start with something like ...
model1 <- lmer(weight ~ treatment + broodsize + sex + age
+ (1|brood) + (age|id:brood), data=H)
You might also like to consider a quadratic term in age, if you think
that growth is quadratic.
Cheers
Andrew
ps spaces enhance legibility :)
On Tue, Sep 05, 2006 at 03:01:30PM +0100, Simon Pickett wrote:
> Hi R experts,
> I am interested on the effects of two dietry compunds on the growth of
> chicks. Rather than extracting linear growth functions for each chick and
> using these in an analysis I thought using ReML might provide a neater and
> better way of doing this. (I have read the pdf vignette("MlmSoftRev") and
> "Fitting linear mixed models in R" by Douglas Bates but I am not entirely
> sure that I have the right solution).
>
> Basically I fed chicks in nest boxes over a period of time and weighed
> them each time I fed them. I presume that "chick id" should be a random
> factor and should be nested within "nest box number"? (Chicks were not
> moved around so this should make things more simple). Also since the
> chicks were measured repeatedly over time I presume that this should be a
> random factor? Growth is not linear exactly (more quadratic), so I thought
> rather than put time in the fixed model I want to control for the effects
> of time as a random factor....
> The resulting model is this
> where id=chick identity and brood=nest box
> model1<-lmer(weight~treatment1*treatment2*brood
> size*sex+(id|brood)+(1|brood)+(1|age), data=H)
>
> Is this the "right" approach or am I barking up the wrong tree?
> Any suggestions much appreciated,
> Simon
>
>
> Simon Pickett
> PhD student
> Centre For Ecology and Conservation
> Tremough Campus
> University of Exeter in Cornwall
> TR109EZ
> Tel 01326371852
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
Email: a.robinson at ms.unimelb.edu.au http://www.ms.unimelb.edu.au
More information about the R-help
mailing list