# [R] Convergence problem in GLMM

Deepayan Sarkar deepayan at stat.wisc.edu
Tue Nov 23 23:10:16 CET 2004

```On Tuesday 23 November 2004 11:14, John Fox wrote:
> Dear list members,
>
> In re-running with GLMM() from the lme4 package a generalized-linear
> mixed model that I had previously fit with glmmPQL() from MASS, I'm
> getting a warning of a convergence failure, even when I set the
> method argument of
>
> GLMM() to "PQL":
> > bang.mod.1 <- glmmPQL(contraception ~ as.factor(children) + cage +
> > urban,
>
> +     random=~as.factor(children) + cage + urban|district,
> +     family=binomial, data=Bangladesh)  # works!
>
> > bang.mod.1 <- GLMM(contraception ~ as.factor(children) + cage +
> > urban,
>
> +     random=~as.factor(children) + cage + urban|district,
> Warning message:
> IRLS iterations for glmm did not converge in: GLMM(formula =
> contraception ~ as.factor(children) + cage + urban,

This dataset is also in lme4 as 'Contraception'.

> Despite the indicated convergence failure, the two sets of estimates
> are quite close, as one would expect. I've also played around with
> various arguments to lmeControl(), but without success.
>
> I'm curious about the source of the difference, since (as I
> understand it), essentially the same algorithm is used by the two
> functions. I'm using R 2.0.1 under Windows XP with the current
> version of lme4.

Probably because the convergence criterion is different. glmmPQL has

if (sum((eta - etaold)^2) < 1e-06 * sum(eta^2))
break

GLMM has

crit <- max(abs(eta - etaold)) / (0.1 + max(abs(eta)))
## use this to determine convergence
if (crit < controlvals\$tolerance) {
conv <- TRUE
break
}

I'm not sure why we chose that. Setting

control = list(tolerance = 1e-3, PQLmaxIt = 100)

converges for me, but that's probably a bit extreme.

Deepayan

```