I'm trying to fit a generalised mixed model for some embryo data and I am getting the error for singular fit. my model is

m1=glmer(segregation ~ total + carrier.gender + (1 | couple/cycle), data=data1, family=binomial)

I can see the variance for both random factors is 0. If I take out the random factors of couple and cycle I do not get this error but for the sake of my experiment I can not exclude these factors. Some of the cycles only include 1 embryo while others have many. Is this the reason for the singular fit? If so is it OK to ignore this message or do I need to adjust my experiment somehow?

Generalized linear mixed model fit by maximum likelihood
  (Laplace Approximation) [glmerMod]
 Family: binomial  ( logit )
segregation ~ total + carrier.gender + (1 | couple/cycle)
   Data: data1

     AIC      BIC   logLik deviance df.resid 
  1138.7   1162.3   -564.3   1128.7      830 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.5164 -1.0245  0.7200  0.8689  1.2760 

Random effects:
 Groups       Name        Variance Std.Dev.
 cycle:couple (Intercept) 0        0       
 couple       (Intercept) 0        0       
Number of obs: 835, groups:  cycle:couple, 242; couple, 141

Fixed effects:
                     Estimate Std. Error z value Pr(>|z|)    
(Intercept)         1.0982377  0.2591267   4.238 2.25e-05 ***
total              -0.0002428  0.0000856  -2.837  0.00456 ** 
carrier.genderMale -0.5164417  0.1428549  -3.615  0.00030 ***
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) total 
total       -0.934       
crrr.gndrMl -0.169 -0.068
convergence code: 0
boundary (singular) fit: see ?isSingular

Thank you


1 Answer 1


You should not trust the results from a model that has not appropriately converged. Start from a simpler model including only the random intercepts for couples, and see if this converges and the variance is positive. Also, fit the model using the adaptive Gaussian quadrature, i.e., set nAGQ to 10 or 15.

  • $\begingroup$ If I use only couples I still get a singular fit. Theoretically the outcome shouldn't be effected by the couple or the cycle but I feel it should be included in the model as some couples have many embryos while others only have 1. $\endgroup$
    – Caity
    Commented Apr 20, 2019 at 12:00
  • $\begingroup$ It will be difficult to see what it's going on without trying on the data. $\endgroup$ Commented Apr 20, 2019 at 18:25
  • $\begingroup$ Thanks for your help Dimitris. I think I just don't understand stats well enough to know what I'm doing. I have tried this as you suggested but still get the singular fit error. m5=glmer(segregation~total + carrier.gender +(1|couple), data=data1, family=binomial,nAGQ = 10) $\endgroup$
    – Caity
    Commented Apr 21, 2019 at 1:03
  • $\begingroup$ If I change nAGQ to equal 0 I no longer get the singular error. I have attached a link to some raw data @Dimitris link $\endgroup$
    – Caity
    Commented Apr 25, 2019 at 1:30

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.