[R-sig-ME] Using lme (possibly nlme) in R

Douglas Bates bates at stat.wisc.edu
Thu Jul 23 18:39:33 CEST 2009

Sarah sent this directly to me and I am pretty much wiped out right
now having finished the third short course in a month and preparing or
helping to prepare three other presentations.  Could someone else take
a stab at answering this?  I'm tired and I have a full day of
international travel ahead of me tomorrow and I would probably give
nonsense advice.  It looks as if it is urgent for her.

On Thu, Jul 23, 2009 at 11:28 AM, <s.buckmaster.08 at aberdeen.ac.uk> wrote:
> I am an MSc Ecology student in Scotland, UK and am struggling to analyse my dissertation data in R - I only have today and tomorrow to understand my output and so was hoping you could offer some advice. I would be really grateful!
> I carried out a plant experiment examining plant interactions between two species (A and B) under different watering treatments. I had
> - 7 watering treatments (7 different watering frequencies labelled 1-7) ...and...
> - 3 replicates of each treatment
> At each watering treatment, I had 5 different combinations of plants. I have shown how I have labelled these in brackets for species A:
> A in isolation (Aiso)
> A+A monoculture (Amono)
> A+B interspecific competition (Amix)
> .. and the same for species B.
> The first step is to check species A for interspecific competition.... I need to see whether I have a significant replicate effect (block effect) and as this will be a random effect, I am going to use a lme. I have the following factors:
> Response variable:  Amix
> Random effect:      Block (replicates labelled as 1,2,3)
> Main effect:          watering treatment (wt) (1-7)
> Covariate:             Aiso
> Covariate:             Amix.initialsize (initial biomass of Amix to account for any size variation before treatment was started)
> I used following formula in lm (before I thought I'd have to include block as random effect):
> lm1<-lm(Amix~Aiso+wt+block+Amix.initialsize+Aiso:wt)
> but do not know how to structure it in an lme. How would I do this?
> Also, what is the difference between an lme and an lmer as I was unsure which one to use,
> Thank you,
> Sarah Buckmaster
> E-mail: s.buckmaster.08 at aberdeen.ac.uk

More information about the R-sig-mixed-models mailing list