[R-sig-ME] Non-convergence error for GLMM with LME4?

Ben Bolker bbolker at gmail.com
Sun Mar 24 17:28:11 CET 2013


[forwarding to r-sig-mixed-models at r-project.org, a more appropriate venue]

Leanna Jones <leanna_jones <at> hotmail.com> writes:

> Hello!  I am trying to run a GLMM using LME4, and keep getting the 
> warning message: "In mer_finalize(ans) : false convergence (8)" I
> am quite new to R, and in looking into this thus far, it appears
> that there are a variety of reasons why this might occur, such as
> needing to standardize some parameters or if all subjects in one
> combination of parameters all have the same outcome.  I also
> understand that the warning does not necessarily mean that the
> model results are invalid, but they might be...however, I am unsure
> how to interpret this in my own situation.  I started with a
> somewhat more complex model, but kept simplifying it to see if I
> could get the warning to go away (so it might indicate which
> predictor variable was the problem...). However, even when using a
> single fixed effect variable (just sex, for instance), I continue
> to have the problem, which makes me think the issue may be with my
> random effect.  Here is the model I would like to run:


mm1=lmer(BinomialOutcome~AgeGroup+Sex+Study.Site+(1|BearID.reformatted),
      family=binomial)

> The study is based on bear captures over a period of time, such
> that some bears are captured only once, while others many times (in
> a very unbalanced fashion); I would like to use all the data, but
> want to account for resampling of specific individuals.  However,
> this means that there are nearly 600 different bear IDs, and I am 
> wondering if this is the reason why the model will not converge?
> If so, what is the best way to address this?  Or other ideas as to
> what might be going on?

Are the covariates distinct for each bear, or do bears change
age group and/or study site over the course of the study?  (Presumably
their sex is fixed ...)  If the former, then you could collapse
the data set to fraction of 'successes' (BinomialOutcome) per bear,
as in

library("plyr")
ddply(dataset,c("AgeGroup","Sex","Study.Site","BearID"),
    summarise, n = length(BinomialOutcome),
    p = mean(BinomialOutcome))

[snip]

Warning message:In mer_finalize(ans) : false convergence (8)

> I read something on another thread about high values (like the
> -9.6) being a problem here, but I do not completely understand how
> to interpret or address it.

> The model will run (those results pasted below), and appear highly
> significant, but I do not know to what extent they can be
> trusted...in case it is relevant, I am using the 64-bit version of
> R 2.15.1.  Any help is greatly appreciated!  Thank you!!

>> summary(mm1)
> Generalized linear mixed model fit by the Laplace approximation 
> Formula: BinomialOutcome ~ AgeGroup + Sex + Study.Site + (1 |
> BearID.reformatted)
  AIC   BIC logLik deviance 607.2 662.7 -292.6    585.2

Random effects: Groups             Name        Variance Std.Dev.
BearID.reformatted (Intercept) 156.5    12.51
Number of obs: 1146, groups: BearID.reformatted, 546
 Fixed effects:       Estimate Std. Error z value Pr(>|z|)
(Intercept)             -9.644     18.171  -0.531  0.59562
AgeGroupMiddle(6-9)     10.025      1.901   5.273 1.34e-07 ***
AgeGroupOld(10-14)      13.182      2.124   6.207 5.38e-10 ***
AgeGroupOlder(15-19)    13.914      2.270   6.129 8.82e-10 ***
AgeGroupOldest(20-29)   15.403      2.553   6.033 1.61e-09 ***
AgeGroupYearling(0-1)   -6.171      2.136  -2.889  0.00387 **
AgeGroupYoung(4-5)       7.639      1.837   4.159 3.20e-05 ***
SexM                     9.759      2.077   4.700 2.61e-06 ***
Study.SiteNorth         -9.873     18.211  -0.542  0.58770
Study.SiteSouth         -5.397     18.120  -0.298  0.76584

The large-magnitude estimates are mostly due to the fact that
your baseline group (which is presumably the 2-3 year old, female
individuals) has a very low success probability, and that there
are very wide differences in success overall --  from a probability
of 0.0001 in the baseline group (1/(1+exp(9)))= plogis(-9)
to perhaps 99% in the oldest group (plogis(-9+15)). The large
standard errors (18 for the intercept and study site effects)
also indicate that the Hauck-Donner effect, where extreme values
are poorly tested by the default Wald test, is operating.

It would probably be easier to interpret your results if you
reorder the AgeGroup factor so that the order actually corresponds
to age, rather than alphabetical ... then you might want to use
contr.sum (or contr.Sum from the car package) to set the baseline
to the mean across treatments, which will make the effects _slightly_
less extreme (although not much less, since there is a difference
of 21 logit units between the youngest and oldest groups).  (With
about 1200 observations, you must have perfect separation, with
zero successes in the younger groups and 100% in the older groups.)

drop1(mm1,test="Chi")
Single term deletions
Model:BinomialOutcome ~ AgeGroup + Sex + Study.Site +
  (1 | BearID.reformatted)
           Df    AIC    LRT   Pr(Chi)
<none>        607.20
AgeGroup    6 992.46 397.27 < 2.2e-16 ***
Sex         1 643.17  37.97 7.190e-10 ***
Study.Site  2 626.79  23.60 7.522e-06 ***

So the basic story here (which should be backed up by looking
at your data) is that you have very

If you want to try this out with the development version of lme4,

install.packages("lme4",repos="http://lme4.r-forge.r-project.org")

should work ...

  It would be nice to use some form of regularization on this
(e.g. set some priors or penalization on the parameters) -- you
can do this via AD Model Builder or WinBUGS, or possibly via
the blme package ....)

  good luck,
   Ben Bolker



More information about the R-sig-mixed-models mailing list