What are common causes of a 'singular fit' in generalized linear mixed-effects models (GLMMs), especially when including random intercepts for grouping variables?

When using the glmer function in R, sometimes you get the warning:

boundary (singular) fit: see help('isSingular')

What strategies or techniques can be employed to address or prevent this issue?


1 Answer 1



Here are some common solutions to singular fits, some of which are listed in the help function listed in the error call for glmer...

  • The most common solution is to simplify the random effects. This is usually best done when complicated random effects are fit to data that do not support such models (Matuschek et al., 2017). An easy check is to look at the by-group plots of your random effects to see if they have enough random variance to actually fit to a model (particularly maximal models with correlated random slopes and intercepts).

  • Use a Bayesian method. First, one can use priors which push the random-effects variance-covariance matrices away from singularity (Brown, 2021; Chung et al 2013). These include but are not limited to the rstanarm, brms, or blme packages. Second, it can force you to think about your data a little more and why it is behaving the way it is.

  • Check for severe collinearity/syntax issues. If you check the VIF of your model predictors and there are some obvious problems, you should refit the model in a way that deals with this issue. If you also specify a model in a bizarre way (fitting two predictors with the same values with different names), this can also crash a lme4 model.


  • Brown, V. A. (2021). An introduction to linear mixed-effects modeling in R. Advances in Methods and Practices in Psychological Science, 4(1), 1–19. https://doi.org/10.1177/2515245920960351
  • Chung, Y., Rabe-Hesketh, S., Dorie, V., Gelman, A., & Liu, J. (2013). A nondegenerate penalized likelihood estimator for variance parameters in multilevel models. Psychometrika, 78(4), 685–709. https://doi.org/10.1007/s11336-013-9328-2
  • Matuschek, H., Kliegl, R., Vasishth, S., Baayen, H., & Bates, D. (2017). Balancing Type I error and power in linear mixed models. Journal of Memory and Language, 94, 305–315. https://doi.org/10.1016/j.jml.2017.01.001

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.