I am analyzing data from bird foraging surveys using the lme4 package in R and I am interested in the effects of field size (area), among other variables, on swallow rate of use. The surveys took place over 2 years, and I’d like to include year as a fixed effect in the model. Each field (n = 31) was surveyed 6 times. So the data look like:
Field Survey Year Area RateOfUse
1 1 2017 3.06 0
1 2 2017 3.06 0.327
1 3 2017 3.06 0.327
1 4 2017 3.06 0.327
1 5 2017 3.06 3.92
1 6 2017 3.06 0.327
1 1 2018 3.06 0
1 2 2018 3.06 0.392
1 3 2018 3.06 2.55
1 4 2018 3.06 2.94
1 5 2018 3.06 0.588
1 6 2018 3.06 0
2
...
In order to include field as a random effect (accounting for the fact that each field has data from 6 surveys), does this make sense:
lme(RateOfUse ~ Area + Year, random = ~1|Field/Survey)
Alternatively, I could included Survey as a fixed effect to account for the fact that rate of use might have dropped off during later surveys:
lme(RateOfUse ~ Area + Year + Survey, random=~1|Field)
I also have a separate variable Field_Survey which is
Field_Survey Year
1_1 2017
1_2 2017
1_3 2017
1_4 2017
1_5 2017
1_6 2017
1_1 2018
1_2 2018
1_3 2018
1_4 2018
1_5 2018
1_6 2018
...
So instead I could do something like:
lme(RateOfUse ~ Area + Year, random = ~1|Field_Survey)
Which of these models makes more sense? Is 31 groupings (fields) way too many? I am a bit rusty with mixed effects models and want to make sure I'm thinking about this correctly.
nlme
notlme4
. Take a look here for how to specify clustering inlme4
$\endgroup$