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
Travis: I wonder if you can modify the example from predict.lm to do
something comparable (saw this posting recently) with mixed effects models
from glmer().
?predict.lm
Offers this example, which seems to meet the request
x - rnorm(15)
y - x + rnorm(15)
predict(lm(y ~ x))
new - data.frame(x =
As with a GLM, I wouldn't expect there to be a difference between
prediction and confidence intervals for a GLMM. Also, and related, the
`interval` argument is particular to the `lm` method of `predict`.
Ben Bolker has an example for a particular lme4 model on his GLMM wiki
FAQ. Go to