[R-sig-ME] advice sought for double paired design

CL Pressland Kate.Pressland at bristol.ac.uk
Wed Jun 3 16:06:07 CEST 2009


Ah yes you're right, I didn't give much information. I realise also I wrote 
this incorrectly.

So, my data is as such:

34 SITES in 17 pairs - paired 'treatment' and 'no treatment', spatially 
close, same site type etc (TREATMENT=0,1, PAIR=1 to 17)
Pre and post treatment surveying (PERIOD=1,2)
2 repeat surveys each time (TRANSECT=1,2)
2 habitats surveyed (HABITAT=1,2)
y is continuous

BACIP - that sounds the just the ticket.

> Therefore you're interested in how y varies between Period 1 and 2
> (before and after), and how Treatment interacts with this, and how the
> treatment interaction varies by habitat.

This is exactly what I'm after.

> Your full model would be something like this:
>
> lmer(y~Period*Treatment*Habitat+Time+(1|Site), data)
>
> or perhaps this:
>
> lmer(y~Period*Treatment*Habitat+Time+(1|Pair), data)

I made an error here - TIME isn't needed. SITES were surveyed over 6 weeks 
for each PERIOD. I could put week/day in as a factor if I think it will be 
important I suppose, but seeing as the members of each pair were surveyed 
simultaneously it may be pointless. I have covariates of weather that 
should help sort out temporal issues too.

Each SITE itself is measured more than once so would I need to include that 
in the random effects, or is it accounted for by the combination of 
TREATMENT and PAIR (Site 1 = treatment (0), pair (1): each combination is 
unique). Am I essentially saying the same thing by having PAIR and SITE as 
random effects? Like so:

lmer(y~Period*Treatment*Habitat+(1|Pair)+(1|Site), data)

What about the TRANSECT repeat? Is it easier to just sum this information 
and ignore the variable altogether, or have it as an additional random 
effect therefore quantifying the variation here too?

lmer(y~Period*Treatment*Habitat+(1|Pair)+(1|Transect), data)

Great to know that I can use a mixed model for this analysis. I've been 
using lme4 for a little while now and it is a highly useful package (much 
thanks to Douglas Bates and Martin Maechler for providing this for us all!).

Kate

--On 03 June 2009 13:46 +0200 Andrew Dolman <andydolman at gmail.com> wrote:

>
>
> Hi Kate,
>
> It's a little difficult to know your data structure from your
> description, it's always helpful to include a sample of the data, or a
> dummy data set with the same structure.
>
>
>> lmer(y~Treatment+Habitat+(1|Site)+(1|Treatment)+(1|Period)+(1|Time),
>> data)
>
> Your Treatment variable presumably has only 2 levels, treated and
> untreated? It's not a good idea to include random effects with fewer that
> 4-5 levels because the model will be attempting to estimate the variance
> across those levels. In any case, Treatment is in no way "random" here.
>
> Likewise, Time and Period both have just 2 levels right?
>
> Period represents before and after treatment? And Time is the two seasons
> in which you measured whatever you measured?
>
> And at each Site you have 2 Habitats?
>
> And your 34 Sites are paired with 1 Site in each pair treated?
>
>
> It sounds like you have a kind of before-and-after-control-impact-pair
> setup BACIP.
>
> You probably want to add a variable, Pair, assuming that your Sites were
> really pairs in a meaningful way (like close together in space relative
> to the other pairs).
>
>
> Therefore you're interested in how y varies between Period 1 and 2
> (before and after), and how Treatment interacts with this, and how the
> treatment interaction varies by habitat.
>
> Your full model would be something like this:
>
> lmer(y~Period*Treatment*Habitat+Time+(1|Site), data)
>
> or perhaps this:
>
> lmer(y~Period*Treatment*Habitat+Time+(1|Pair), data)
>
>  
>
> Andy.
>
>
>
>
> andydolman at gmail.com
>
>
>
> 2009/6/3 CL Pressland <Kate.Pressland at bristol.ac.uk>
>
>
>
>
> Dear mixed modellers,
>
> just want some opinions from those willing to share them - I have a
> design and wonder if mixed models could analyse it.
>
> *I have 34 sites that are split into pairs of sites that do or do not
> receive a treatment. This means I have n=17 as the pairs are obviously
> not independent of each other.
> *I surveyed information from them also _before_ and _after_ treatment was
> applied so each pair/site is also paired over time due to the repeat
> measurement. *With each survey 2 repeat measurements were taken
> simultaneously over 2 habitats.
>
> I was wondering if this is a reasonable design to tackle with mixed
> models? I have researching matched pairs designs but they fail as there
> is the double pairing non-independence issue. I am interested in whether
> or not treatment affects y, and not how site A at time 1 is different to
> site A at time 2 - there is a seasonal issue so I know it will be
> different. Treatment is my key question, and if the 2 habitats are
> affected differently. My limited knowledge of mixed models tells me it is
> doable but I want to check with people that really know what they're
> talking about!
>
> If in theory mixed models are suitable, would a design like this be
> appropriate or will it need to be a little more complex that this super
> simple model?
> lmer(y~Treatment+Habitat+(1|Site)+(1|Treatment)+(1|Period)+(1|Time), data)
>
> Any hints you could give me would be gratefully received.
>
> Kate
>
> -----------------------------------
> Ph.D student and mixed model beginner
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
>



----------------------
Kate Pressland
Office D95
School of Biological Sciences
University of Bristol
Woodland Road
Bristol, BS8 1UG
Tel: 0117 9288918 (Internal 88918)
Kate.Pressland at bristol.ac.uk
www.bio.bris.ac.uk/people/staff.cfm?key=1137




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