Generalized linear mixed model error (binary answer)

I run a generic linear mixed model in R for a binary response variable, and I get an error.

My code is:

library('lme4') m1<-glmer(data=mydata, REPRODUCE~F1TREAT*SO+(1|LINE/MATERNAL_ID), family=binomial) 

Where REPORDUCE = binary, F1TREAT and SO = coefficient, each with two levels. This returns a warning:

 Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Hessian is numerically singular: parameters are not uniquely determined 

However, the m1 object is still displayed in my Values โ€‹โ€‹list. Typing:

 summary(m1) 

returns an error:

 Error in diag(vcov(object, use.hessian = use.hessian)) : error in evaluating the argument 'x' in selecting a method for function 'diag': Error in solve.default(h) : Lapack routine dgesv: system is exactly singular: U[5,5] = 0 

Does anyone know what the problem is? Funny, I can run the model just fine if I exclude the "SO" variable.

Edit:

s (MYDATA, table (PLAY, F1TREAT, SO))

 , , SO = o F1TREAT REPRODUCE control stress 0 61 167 1 125 8 , , SO = s F1TREAT REPRODUCE control stress 0 0 0 1 186 172 

Glm results: Call: glm (formula = REPRODUCE ~ F1TREAT * SO, family = binomial, data = mydata)

 Deviance Residuals: Min 1Q Median 3Q Max -1.49323 -0.30592 0.00005 0.00005 2.48409 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.7174 0.1562 4.594 4.36e-06 *** F1TREATstress -3.7560 0.3942 -9.529 < 2e-16 *** SOs 19.8486 1300.0538 0.015 0.988 F1TREATstress:SOs 3.7560 1875.5931 0.002 0.998 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 898.27 on 718 degrees of freedom Residual deviance: 300.37 on 715 degrees of freedom AIC: 308.37 Number of Fisher Scoring iterations: 19 
+5
source share
1 answer
 with(mydata,table(REPRODUCE,F1TREAT,SO)) , , SO = o F1TREAT REPRODUCE control stress 0 61 167 1 125 8 , , SO = s F1TREAT REPRODUCE control stress 0 0 0 1 186 172 

I was asked that my problem be caused by the fact that some combinations do not exist ( complete separation ). You can see that all plants in the 's' category are bloomed, so SO = s, if you run REPRODUCE perfectly. If I change a couple of lines so that one control โ€œbloomsโ€ and one plant โ€œgrowsโ€, then I can run the model and get the result of the summary () (although with warning messages, possibly due to partial separation). The insignificance of SO in glm is due to the Hauck-Donner phenomenon .

I'm not sure what to do with this

+1
source

Source: https://habr.com/ru/post/1203179/


All Articles