[R-sig-eco] plotting models with confidence bands from glmer

Travis Belote travis_belote at tws.org
Thu Feb 27 20:48:26 CET 2014


Hi all,

I'm wondering if someone can help me figure out how to produce plots of model fits that include 95% CI bands for a generalized linear mixed model. I'm using glmer in lme4 to run essentially an ANCOVA to investigate a three-way interaction between one categorical variable (3 different species) and 2 continuous variables to investigate survival probability (0 or 1) of trees. 

I've found a 3-way interaction between these variables. I have produced a stacked graph showing how the survival probabilities for different species (3 different lines) vary across a gradient of one of the variable and at 2 levels of one of the other variables (shown by 2 panels). I used the parameter estimates to produce the predicted models as line graphs, but I'd like to add a confidence band around the models. I've been looking in Zuur et al's "Mixed effects models and extensions in ecology in R", but wonder if someone has a trick to doing this.

Thanks for any insights! 
Travis


Travis Belote, Ph.D.
Research Ecologist
The Wilderness Society | Northern Rockies Regional Office
503 W. Mendenhall, Bozeman, MT 59715
office: 406.586.1600 x110 | cell: 406.581.3808 



More information about the R-sig-ecology mailing list