I have the following glmer model which I have run in lme4, in R:
m1=glmer(Survived~Offset+(1|Trial/Chamber), family=binomial, data=surviveData)
Survived is a binary response, Offset is a three level factor, Trial is a 2 level factor and Chamber is a 24 level factor. There are 1721 observations in the data set. I would like to obtain 95% CIs for the parameter estimates of this model. To do this I have used the following:
b_par<-bootMer(x=m1,FUN=fixef,nsim=1000, use.u = FALSE, type="parametric")
boot.ci(b_par,type="perc",index=1)
boot.ci(b_par,type="perc",index=2)
boot.ci(b_par,type="perc",index=3)
I have searched for a worked example of boostrapping a glmer model to check that I am using the correct options, however I have not found a good example. There also does not seem to be a definitive solution for errors, of which I get quite a few that look like:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00142642 (tol = 0.001, component 1)
So my questions are:
- Have the options that I have specified for the bootstrap suitable for a glmer model?
- Is there any solution for fixing errors like this yet or do we have to wait for the optimizers to be improved in the lme4 package?
- If error messages are given, does the boot.ci only use the successful re-samples to compute the bootstrap statistics with, and ignore the ones that did not converge? If this is the cae, can I still use the confidence intervals despite the warnings?