I'm plotting 3-way interaction terms from a negative binomial models, and tested the models in two packages to check my work and as a sensitivity analysis. I used the effect function to extract the fit and CIs to plot.
library(lme4) model.lme <- glmer.nb(dv ~ condition * time * gender + (1 | id), family = nbinom(), data = df) effect.out.lme <- effect(term = "condition * time * gender", xlevels = list(condition = c(0, 1), gender = c(1, 2)), mod = model.lme) library(glmmadmb) model.admb <- glmmadmb(dv ~ condition * time * gender + (1 | id), data = df, family = nbinom2(), zeroInflation = FALSE) effect.out.admb <- effect(term = "condition * time * gender", xlevels = list(condition = c(0, 1), gender = c(1, 2)), mod = model.admb)
When I examined the fitted values to plot, the estimates from
glmer.nb() were in the expected range for the scale of the DV. However, the confidence intervals from
glmmadmb() included negative values, and the fit estimates were much smaller than what would be expected given the range of the scale, so I assumed they were log transformed and exponentiated them. This got me fit estimates that were generally similar to those from
glmer.nb(), but the
glmmadmb() confidence intervals are much, much wider than those from
glmer.nb(), and overlap substantially with each other when I graph them.
What's happening here?