0
votes

I would like to ask for your help in specifying the random effects of a model I have been working on in lme4. I have data from a field survey. The objective of the study is to relate wing size (respond variable) with habitat (exploratory variable, categorical variable with 2 levels). We performed a paired design by sampling 50 individuals of 3 species in a simple habitat and the same 3 species (n=50 again) in a complex habitat in a region. We replicated that in 20 regions. I am both interested in the species specific effects and community effects. For running the analyses per species is this model correct?

modela<-lmer(Wingsize~Habitat+(1|Region))

For community wide effects is this model correct?

modelb<-lmer(Wingsize~Habitat+(1|Region/Habitat/Species))

Schematic (from on-hold CrossValidated question:

Short Dataset

1

1 Answers

0
votes

I would not use Habitat both as fixed effect and group level effect, because then you have a "perfect" correlation between group level and fixed effects. Rather, I would use Habitat only as fixed effect:

modelb<-lmer(Wingsize~Habitat+(1|Region/Species))