Hi Kate,
Pair, Site and Transect are not crossed, they are nested. So if they were
going to go in it should be something like this + (1|Pair/Site/Transect)
I would also average or sum across transects unless they capture some
variability you're actually interested in - rather than just measurement
error or environmental noise.
I'm not now sure whether Site should be included in the random effects. It
should either be either 1|Site or 1|Pair but not 1|Pair/Site because again,
there's only 2 Sites per Pair and that's not enough to estimate the variance
properly. Hopefully you'll get a further answer from one of the regular
posters and package contributors on this list who know an awful lot more
about it than I.
>"Each SITE itself is measured more than once so would I need to include
that in the random effects?"
As for the transect level, I would average across those "more than once"
measurements unless they capture something you're interested in.
Andy.
andydolman@gmail.com
2009/6/3 CL Pressland
> 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
>
[[alternative HTML version deleted]]