Hi Søren,
Many thanks for your comments – makes perfect sense! I was just thinking though that it might be nice if PBkrtest was a little bit more robust to these kind of situations by providing a few different user options re how to deal with non-congergence. Ignoring the non-converging ones would indeed likely lead to bias, but if it made the p values a little conservative it still wouldn’t be so bad I think (especially not if non-convergence were rare). So as possible options I would see (1) ignoring those runs or (2) not ignoring them, but allowing a user defined LRT value for those nonconverging runs (aside from making lme4 more robust of course).
I agree it would be a bit of a hack, but likely still useful for some… In general throwing some warnings for non-converging runs I think would also be better than throwing an error which then stops all calculations altogether… (especially if this only affects a minority of the runs)

Cheers,
Tom

From: Søren Højsgaard [mailto:sorenh@math.aau.dk]
Sent: 25 September 2013 21:27
To: Tobias Heed; Tom Wenseleers
Cc: Ben Bolker; henrik.singmann@psychologie.uni-freiburg.de; r-sig-mixed-models@r-project.org
Subject: RE: [R-sig-ME] Passing lme4 optimizer arguments to pbmodcomp and afex/mixed

[>>] Dear all,
Just a comment on Tom’s remarks (below): Calling PBkrtest on a linear mixed model with the CRAN version of lme4 often leads to this lack of convergence – or convergence to something “strange”. We have often found negative value LRT values (so logL of the smaller model is larger than logL of the larger model) and this happens when the variance components are estimated to zero

The github version has never in our studies given these bizarre results. My conclusion from this is that the github version of lme4 has better numerical properties that the CRAN version. It seems that you have found that with glmm’s then even the github version can fail.

Simply excluding the samples for which there is no convergence is probably a bad idea. My “experience” (no systematic studies have been made) is that lack of convergence arises for simulated datasets which fit “too well” to the simple model. So simply excluding those samples must lead to too large p-values. Setting negative LRT values to zero is – by the same logic – probably a better thing to do, but it is certainly a not too nice hack!

All the best
Søren

I presume it has to do with some simulated datasets not allowing parameters to be accurately estimated. I wonder if it wouldn't be possible perhaps to let PBmodcomp just ignore the ones for which no convergence could be achieved (or else to conservatively assume that the simulated LRT value in those cases was more extreme than the observed ones - which is probably better and less likely to lead to strong biases - at least you wouldn't have strong evidence that in those cases the LRT value for the simulated dataset was smaller than the observed one), and throw a warning in which it would be reported in how many cases no convergence could be achieved (if this number of small, the result might still be more or less usable). Or is there something that could be done on the lme4 side with respect to optimizer settings to get over this? Also, is there perhaps some provisions to calculate p-values for all factors from the lme4 likelihood profiles?

Cheers,
Tom


-----Original Message-----
From: Henrik Singmann [mailto:henrik.singmann@psychologie.uni-freiburg.de]
Sent: 25 September 2013 15:36
To: Ben Bolker
Cc: Tom Wenseleers; Søren Højsgaard; r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
Subject: Re: Passing lme4 optimizer arguments to pbmodcomp and afex/mixed

I am also currently working on a binomial GLMM on which I encounter this problem regularly (depending on which model I fit). But as my data is somewhat large (12000 observations) and fitting takes a while I wouldn't consider it a nice demonstration of the issue.

However, I did try to increase the number of steps in pwrssUpdate by altering the source of lme4 and, as predicted by Ben, this does not help at all (it just reaches the new boundary).

But, if nevertheless someone is interested to try it out for him or herself, you can install a version of lme4 1.1.0 that is identical to the development version as of yesterday that only stops after 10000 pwrssUpdate steps from my github:
library("devtools"); install_github("lme4",user="singmann")

Best,
Henrik

-----Original Message-----
From: Ben Bolker [mailto:bbolker@gmail.com]
Sent: 25 September 2013 15:21
To: Tom Wenseleers; Søren Højsgaard; henrik.singmann@psychologie.uni-freiburg.de<mailto:henrik.singmann@psychologie.uni-freiburg.de>; r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
Subject: Re: Passing lme4 optimizer arguments to pbmodcomp and afex/mixed


 At the moment it's not possible to increase the number of iterations; that's on the list to allow, but my guess is that that's not going to help. Unfortunately, our test cases for lme4 did not include a lot of binomial GLMMs with complete separation and/or extreme values of the beta parameters (say |beta|>5).  I suspect that what's going on here is similar to the examples listing in these issues ..

https://github.com/lme4/lme4/issues/134
https://github.com/lme4/lme4/issues/124

 Is it in fact the case that if you fit this model with lme4.0 (or an older version of lme4) you get large values of beta?

 Looks like we're going to have to put higher priority on fixing this ...

 Ben Bolker


On 13-09-25 09:13 AM, Tom Wenseleers wrote:
Dear all, Just  a quick question re pbmodcomp (I'm using version
0.4-0 of pbkrtest, and latest devel version of lme4). I am calling
pbmodcomp via afex, but I am getting the dreaded error "3 nodes
produced errors; first error: pwrssUpdate did not converge in 30
iterations" (my call is
mixed(ALATES~ANT_TENDED*MELEZITOSE+NR_START+(1|CLONES)+(1|PLANT)+(1|RE
PLICATE),type=3,family=poisson,method="PB",args.test
= list(nsim = 10,cl=cl),data=data_alates) ).

I would now like to try passing some optimizer arguments to the lmer
calls. To do this I first called options(glmerControl=list(optimizer
= c("bobyqa", "bobyqa"),tolPwrss = 1e-03
,optCtrl=list(maxfun=1000))) But then I still get " pwrssUpdate did
not converge in 30 iterations". Does one of you happen to know how I
could perhaps change the nr of maximum iterations to >30? And also if
it is possible to pass such arguments in the call to mixed and/or
pbmodcomp?

Cheers, Tom


______________________________________________________________________
_________________

Prof. Tom Wenseleers P      Lab. of Socioecology and Social
Evolution Dept. of Biology Zoological Institute K.U.Leuven
Naamsestraat 59, box 2466 B-3000 Leuven Belgium +32 (0)16 32 39 64 /
+32 (0)472 40 45 96 //tom.wenseleers@bio.kuleuven.be<mailto:tom.wenseleers@bio.kuleuven.be>
http://bio.kuleuven.be/ento/wenseleers/twenseleers.htm




_______________________________________________
R-sig-mixed-models@r-project.org<mailto:R-sig-mixed-models@r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]

