[R-sig-ME] longitudinal analysis of nested samples

Christopher Eckert chris.eckert at queensu.ca
Mon Oct 17 15:37:31 CEST 2011


Chris Eckert
Department of Biology
Queen's University
Kingston, Ontario K7L 3N6 Canada
chris.eckert at queensu.ca


> 
> Date: Mon, 17 Oct 2011 08:20:19 +0000
> From: "ONKELINX, Thierry" <Thierry.ONKELINX at inbo.be>
> To: Giancarlo Sadoti <gcsadoti at yahoo.com>,
> 	"r-sig-mixed-models at r-project.org"	<r-sig-mixed-models at r-project.org>
> Subject: Re: [R-sig-ME] longitudinal analysis of nested samples
> Message-ID:
> 	<AA818EAD2576BC488B4F623941DA74273B8A26EA at inbomail.inbo.be>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Dear Giancarlo,
> 
> You will need to have a look at your data. Since you claim that TR has 4 levels but the model output indicates only one (Number of obs: 560, groups: TR, 1).
> 
> The trees are nested within point. Therefore a more likely model is lmer(V ~ YR + (1|PT/TR), data=TREES) or lmer(V ~ YR + (1|PT) + (1|PT:TR), data=TREES) Both models are identical, the second is a bit more verbose but more clear. If the points are nested within transects then you can simply add it to the model: lmer(V ~ YR + (1|Transect) + (1|Transect:PT) + (1|Transect:PT:TR), data=TREES)
> 
> These are models with only a random intercept. You can add random slopes as well. E.g. if you want a random slope along year at the tree level:
> lmer(V ~ YR + (1|Transect) + (1|Transect:PT) + (1 + YR|Transect:PT:TR), data=TREES)
> 
> Best regards,
> 
> Thierry
> 
I am interested in this analysis and have a question for Dr. Onlelinx:
He suggested that for a random slopes and intercepts model, one would use:
> lmer(V ~ YR + (1|Transect) + (1|Transect:PT) + (1 + YR|Transect:PT:TR), data=TREES)
Why is the 4th term (1+ YR|Transect:PT:TR) why not just (YR|Transect:PT:TR)?
Thanks very much for any light you can shed on this.
I'm still coming to terms with lmer syntax.

Chris Eckert
Department of Biology
Queen's University
Kingston, ONtario, Canada




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