[R-sig-eco] error strata in R

carlos.perez at uam.es carlos.perez at uam.es
Sat Jan 23 18:53:02 CET 2010


> Date: Fri, 22 Jan 2010 14:52:52 +0000
> From: Nick Cutler <nick.cutler at ouce.ox.ac.uk>
> To: "r-sig-ecology at r-project.org" <r-sig-ecology at r-project.org>
> Subject: [R-sig-eco] error strata in R
> Message-ID: <4B59BBC4.8050106 at ouce.ox.ac.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I'm working on long-term vegetation development on lava flows. I'm
> interested in the relationship between various ecological and
> environmental response variables (e.g. days of snow cover, soil
> temperature, foliar nutrient concentrations) and two fixed
> factors: microtopographic position ('Topo', with two levels: 'hillock'
> and 'hollow') and lava flow age ('Age', with three levels: '26_years',
> '161_years' and '848_years').
>
> Three lava flows of different ages were selected for the study. Sampling
> was carried out at three locations on each flow; each location comprised
> paired 'hillock' and 'hollow' plots (below).
>
> Flow		Location	Topo
> 26_years	1		Hillock
> 26_years	1		Hollow
> 26_years	2		Hillock
> 26_years	2		Hollow
> 26_years	3		Hillock
> 26_years	3		Hollow
> 161_years	4		Hillock
> 161_years	4		Hollow
> 161_years	5		Hillock
> 161_years	5		Hollow
> 161_years	6		Hillock
> 161_years	6		Hollow
> 848_years	7		Hillock
> 848_years	7		Hollow
> 848_years	8		Hillock
> 848_years	8		Hollow
> 848_years	9		Hillock
> 848_years	9		Hollow
>
> Generally, there was only one observation per cell. In this design,
> there are replicate observations of hillocks/hollows on each flow, but
> these observations are paired (a bit like a split plot design, or what
> Quinn & Keogh call a partly-nested ANOVA).
>
> I would like to analyze the effect of Age and Topo on the response
> variables (taking each variable individually). My initial thought was to
> use aov with Age and Topo as fixed effects, and Location (a blocking
> factor) as a random effect. But I am not sure how to specify the error
> term to account for the blocking. Would lme be more appropriate in this
> case?
>
> Can anyone help with the model specification?
>
> Nick
>
> --
> Dr Nick Cutler
> Postdoctoral Research Assistant
> School of Geography and the Environment
> Oxford University Centre for the Environment
> Dyson Perrins Building
> South Parks Road
> Oxford OX1 3QY
> UK
>
> Tel.: +44 1865 275 860
>
>
>
> ------------------------------
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
> End of R-sig-ecology Digest, Vol 22, Issue 19
> *********************************************
>


I suggest you to use lmer:

library(lem4)

Since you want to use Age and Topo as fixed effects and Location as a  
grouping factor, I think the model could be something like:

model<-lmer(snowcover~Age*Topo+(1|Location))

Cheers

Carlos



More information about the R-sig-ecology mailing list