[R] Why have my glmms stopped converging (lme4)

Ben Bolker bbolker at gmail.com
Fri Jun 6 17:11:34 CEST 2014

Heather Baldwin <heather.baldwin <at> uni-ulm.de> writes:

>  I have four sets of glmms (binomial, logit-linked) which I have run in
> various incarnations with no problems over the last weeks. All converged,
> data assumptions checked, reasonable goodness-of-fit (0.75-85). They are
> based on three different data sets. Today, I wanted to rerun one of them
> after amending the data set slightly, and I got the
>  following error message:
> Warning message:In checkConv(attr(opt, "derivs"), opt$par, ctrl =
> control$checkConv,  :   Hessian is numerically 
> singular: parameters are not
> uniquely determined
> I tried re-running the model with the older unchanged version of the data
> on which the model previously converged, and got the same message. I have
> not change the model specification at all. I then re-ran my other models
> which use different data sets to see what would happen, and I got the
> following message for each:
> Warning message:
> In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>   Model failed to converge with max|grad| = 0.00846421 (tol = 0.001)
> I went back to previous versions of the model and  older versions of the
> data sets and I'm still getting these error messages, but only for mixed
> models. For models with only fixed effects, they are as before. But the
> point is that my mixed models were converging before.
> Any ideas on what is going on? I might be missing something obvious, but it
> really seems like this came out of nowhere.

   You probably updated your version of lme4 to 1.1-6, which has
stronger tests for convergence, some of which are false positives.  In
other words, it's not that your models stopped converging (if you were
to compare to older results I strongly suspect you would see precisely
the same fits), but that they started complaining about convergence.

  The max|grad| warning is completely expected and most likely
a false positive: see https://github.com/lme4/lme4/blob/master/README.md .

  The singular Hessian warnings are a bit more interesting. They
_might_ be caused by strongly different scaling in different 
predictor variables, or they might actually indicate a real convergence
issue.  If you'd like to follow this up, please contact me off-list
(or post a message with a link to data on r-sig-mixed-models
@ r-project.org)

 > > Further
information about my models: > I used the following commands: >
library(lme4) > mod<- glmer(y ~ x1 + x2 + x3 + x4 + x5 + (1|x6) +
(1|x7) +(1|x8) , data = > data, family = binomial (logit)) > I am
looking at the effects of ecological factors on the presence of >
pathogens in wildlife. Most of my variables are categorical. Fixed
factors > are reproductive status, month, presence of particular
ectoparasites, and a > body condition index. Random factors are site,
year, and observer (to > account for potential observer-biased
condition index).  > > I’m running R 3.1.0 in Mavericks.  > >
This is my first time posting in this list, so I hope my question is >
acceptably formulated. 

  You should try to avoid posting in HTML, and you should probably
have selected the r-sig-mixed-models (@r-project.org) mailing list.

More information about the R-help mailing list