GLMER – Troubleshooting Model Convergence Issues in R Using lme4 nlme Packages

lme4-nlmemixed modelmultilevel-analysisr

My model is a three level MLM with dichotomous outcome using lme4::glmer (projects nested in Categories and then nested in Years):

glmer(successdummy ~ V1 + V2 + V3 + V4 + V5  
+(1| LaunchedFromEpochYEAR/MainCategory), data = mydata, family = binomial(link = 'logit') , na.action = na.omit, control=glmerControl(optCtrl=list(maxfun=2e4)))

the error that I get is:

Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.00247863 (tol = 0.001, component 1)

Can It be because the LaunchedFromEpochYEAR is not actually a cluster? For the Null model I get the following:

Null Model

glmer(successdummy ~ 1
                        +(1|LaunchedFromEpochYEAR/MainCategory), data = mydata, family = binomial(link = "logit") ,na.action = na.omit, control=glmerControl(optCtrl=list(maxfun=2e4))

Results of Null model

Random effects:
 Groups                             Name        Variance Std.Dev.
 MainCategory:LaunchedFromEpochYEAR (Intercept) 0.3289   0.5735  
 LaunchedFromEpochYEAR              (Intercept) 0.0000   0.0000  

Also strangely when I change the order of clusters to

(1|MainCategory/LaunchedFromEpochYEAR)

There is no error.

Any suggestions would be useful.

Best Answer

A couple of notes:

  • Often in complex designs such as the one you postulated it could happen that the actual data do not have strong enough correlations to support including all random effects the design dictates. This is especially the case for binary outcome data that contain the least amount of information compared to other types of data (e.g., count, ordinal, continuous). Hence, it is often better to start with a simpler model and try adding each time random effects to see if they improve the fit of the model sufficiently.
  • As further evidence for the comment above, note that the estimated variance for the term LaunchedFromEpochYEAR is practically zero, suggesting that you do not need this random effect term into the model.
Related Question