Binominal GLMM in Lmer
Claire M. Sheridan wrote:
I am new to the use of R and to GLMM's. I am not sure how to interpret my results. I first modeled my most complex model with all of my hypothesized fixed effects(print out below). From my Pr(>|z|) values I feel that I should be able to say that none of the fixed effects significantly affects presence. I also ran models in which I took out one fixed effect at a time and compare using ANOVA.
Do you mean anova()? (This runs a likelihood ratio test, confusingly enough.) I also started with more basic models (1 fixed
effect)
with no random effect? or do you mean 1 fixed effect + random effects? and compared it to a model with only random effects (with the #1 in
place of where the fixed effect would be). Using ANOVA I also compared those models. What is confusing to me is that I sometimes get lower AIC values and significant p-values for the ANOVA with the model with a single fixed effect vs. a model with no fixed effect. I was expecting based on the Pr(>|z|) values that I would get lower AIC values for the no fixed effects model. For any variation that I run on the model (1-7 fixed effects), the Pr(>|z|) values are always >0.05. Can someone help explain this to me? I'm really sorry if this something that has already been addressed, but I couldn't find anything on the message boards similar to my question.
Which other variables are included matters in GLMMs (it matters in any modeling framework where the effects are not perfectly orthogonal, which includes most regression models, any nonlinear model, and GLMMs). It is not shocking that you find some cases where adding some variables to the simplest/null model improves prediction, but adding the same variables to a model with the other 6 variables present does not. In addition, AIC and Likelihood ratio test p-values are completely different frameworks, my fairly strong advice is to pick one or the other & not to use them in the same analysis. These issues are fairly generic to modeling/model selection problems as soon as one leaves the balanced/orthogonal/designed experiment case. Zuur et al (mixed models book), Harrell (applied regression modeling) are both recommended. Others may have other recommendations.
print(m1<-lmer(Presence ~FixedEffect1 + FixedEffect2 + FixedEffect3 + FixedEffect4 + FixedEffect5 + FixedEffect6 + FixedEffect7 + (1|Site) + (1|Year), family=binomial, REML=FALSE)) Generalized linear mixed model fit by the Laplace approximation Formula: Presence ~FixedEffect1 + FixedEffect2 + FixedEffect3 + FixedEffect4 + FixedEffect5 + FixedEffect6 + FixedEffect7 + (1 | Site) + (1 | Year) AIC BIC logLik deviance 88.9 110.8 -34.45 68.9 Random effects: Groups Name Variance Std.Dev. Site (Intercept) 0 0 Year (Intercept) 0 0 Number of obs: 66, groups: Site, 4; Year, 2
The zero variances here suggest fairly strongly that you're overfitting. It's hard to fit a random-effects term with only 4 sites, and even harder with only 2 years (e.g. search for "Are there enough levels" in <http://glmm.wikidot.com/faq>)
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -17.793834 9.299257 -1.914 0.0557 .
FixedEffect1 0.164940 0.175818 0.938 0.3482
FixedEffect2 0.068806 0.057713 1.192 0.2332
FixedEffect3 -0.004817 0.004070 -1.183 0.2367
FixedEffect4 0.375625 0.399966 0.939 0.3477
FixedEffect5 -0.112683 0.658858 -0.171 0.8642
FixedEffect6 2.672537 2.158679 1.238 0.2157
FixedEffect7 -0.175103 0.132223 -1.324 0.1854
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Ben Bolker Associate professor, Biology Dep't, Univ. of Florida *** NEW E-MAIL ADDRESSES: *** bbolker at gmail.com , bolker at math.mcmaster.ca bolker at ufl.edu / people.biology.ufl.edu/bolker GPG key: people.biology.ufl.edu/bolker/benbolker-publickey.asc