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 wise effects is this model correct? modelb<-lmer(Wingsize~Habitat+(1|Region/Habitat/Species)) For a schematic check this https://stats.stackexchange.com/questions/419693/specify-random-effects-in-lme4 Thank you in advance, Ben
specify random effects in lme4
1 message · Ben Adams