[R] Convergence problem in GLMM
John Fox
jfox at mcmaster.ca
Wed Nov 24 00:18:34 CET 2004
Dear Deepayan,
Thanks for the explanation (and for pointing out that the data set is also
in the lme4 package). I had tried control=lmeControl(tolerance=1e-4,
PQLmaxIt=100) and control=lmeControl(PQLmaxIt=1000), but gave up at that
point. I just tried lmeControl(tolerance=1e-4, PQLmaxIt=1000), and that
works. I guess I just was insufficiently persistent.
Regards,
John
--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
--------------------------------
> -----Original Message-----
> From: Deepayan Sarkar [mailto:deepayan at stat.wisc.edu]
> Sent: Tuesday, November 23, 2004 5:10 PM
> To: r-help at stat.math.ethz.ch
> Cc: John Fox; 'R-Help'
> Subject: Re: [R] Convergence problem in GLMM
>
> 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,
> > + family=binomial, data=Bangladesh, method="PQL")
> > 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
More information about the R-help
mailing list