Skip to content
Prev 14199 / 20628 Next

new R user struggling with error and convergence issues

It is admittedly hard to increase the "maxstephalfit" parameter, but
part of the reason we haven't put much effort into making it easier is
that in our experience it rarely helps.  Log-binomial models in
particular are tricky because the log link (i.e. the exponential
inverse-link) doesn't naturally constrain the response to the allowed
range of (0,1), so these models are hard to fit (the same applies to
inverse-link Gamma models).  The bigger your data set, the more likely
you are to run into cases where the predicted value is >1.  We could
admittedly do a much better job giving useful warnings about when and
where this problem occurred, and (more controversially) allow users to
clamp the output of the inverse-link function to the allowable domain
...

library("lme4")
set.seed(101)
dd <- data.frame(x=seq(-4,4,length=500),
                 f=sample(letters[1:10],size=500,replace=TRUE))
dd$y <- simulate(~x+(1|f),family=binomial,
                 newdata=dd,newparams=list(beta=c(0,1),theta=1))[[1]]
library("ggplot2")
ggplot(dd,aes(x,y,colour=f))+geom_point()+
    geom_smooth(method="glm",method.args=list(family=binomial))

m1 <- glmer(y~x+(1|f), dd, family=binomial)
m2 <- glmer(y~x+(1|f), dd, family=binomial(link="log"))  ## PIRLS
step-halving problem

On Mon, Feb 15, 2016 at 2:22 PM, Jennifer Yourkavitch via
R-sig-mixed-models <r-sig-mixed-models at r-project.org> wrote: