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?
summary(m1)
Generalized linear mixed model fit by maximum likelihood
(Laplace Approximation) [glmerMod]
Family: binomial ( logit )
Formula:
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