我正在运行带有二项式响应变量和分类预测变量的 glmm。随机效应由用于数据收集的嵌套设计给出。数据如下所示:
m.gen1$treatment
[1] sucrose control protein control no_injection .....
Levels: no_injection control sucrose protein
m.gen1$emergence
[1] 1 0 0 1 0 1 1 1 1 1 1 0 0....
> m.gen1$nest
[1] 1 1 1 2 2 3 3 3 3 4 4 4 .....
Levels: 1 2 3 4 5 6 8 10 11 13 15 16 17 18 20 22 24
我运行的第一个模型看起来像这样
m.glmm.em.<-glmer(emergence~treatment + (1|nest),family=binomial,data=m.gen1)
我收到两个如下所示的警告:
Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.0240654 (tol = 0.001, component 4)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?
模型摘要显示其中一种处理具有异常大的标准误差,您可以在此处看到:
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.565 1.038 2.472 0.0134 *
treatmentcontrol -1.718 1.246 -1.378 0.1681
treatmentsucrose 16.863 2048.000 0.008 0.9934
treatmentprotein -1.718 1.246 -1.378 0.1681
我尝试了来自 glmer control 的不同优化器和来自其他包的函数,我得到了类似的输出。我已经使用 glm 运行模型,忽略了随机效应,问题仍然存在。在探索数据时,我意识到高标准的治疗。错误仅在响应变量中成功。只是为了检查这是否可能导致问题,我添加了一个带有“失败”的假数据点来进行该处理,并且模型运行顺利,并给出了合理的标准误差。你可以在这里看到:
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.4090 1.6712 2.040 0.0414 *
treatmentcontrol -1.8405 1.4290 -1.288 0.1978
treatmentsucrose -0.2582 1.6263 -0.159 0.8738
treatmentprotein -2.6530 1.5904 -1.668 0.0953 .
我想知道我的直觉是否正确,因为这种治疗没有失败,无法进行良好的估计,我该如何解决这个问题。
提前致谢!