# GLMM failure to converge warning

I built a generalized linear mixed model using the code:

detect_global <- glmer(outcome ~ season*year + season*sex + sex*year + (1 | obsname) + (1 | bird),
data = detect,
family = binomial)


Season is a 3-level factor (molting, breeding, and winter), year is a 3-level factor (2019, 2020, and 2021), sex is a 2-level factor, and obsname and bird are random effects. Bird is a 4-letter ID for each bird in the study (~50), and obsname is an ID for each observer in the study (5). Each bird was sample a minimum of 25 times.

Then, I used the MuMIn::dredge function to produce a list of all possible models, ranked by AICc. However, I receive this warning when I run the code:

Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
Model failed to converge with max|grad| = 0.00204414 (tol = 0.002, component 1)


If I include main effects only and get rid of the interactions, this warning disappears. If I run a model with interactions but exclude bird as a random effect, the warning also disappears. Does that mean I have to run main effects only or exclude bird, or is there a way to correct this?

• Here are some answers. As a general proposition, procedures that automatically include large numbers of variables or posit large numbers of models in a search tend to turn up instances that are unstable. This can happen even with huge datasets.
– whuber
Nov 19, 2021 at 18:14