[R-sig-ME] specify random effects in lme4
Ben Adams
ben@95472 @end|ng |rom gm@||@com
Thu Aug 1 16:47:11 CEST 2019
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
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list