[英]Is there a workaround for non-convergence in glmmTMB models using the dredge function of MuMin?
I've tried to use the dredge-function of the MuMin-Package for a negative binomial generalized linear mixed model fitted with the package glmmTMB.我尝试将 MuMin-Package 的疏通功能用于配备 package glmmTMB 的负二项式广义线性混合 model。
Because my full-model failed to converge, I've tried the workaround as described here: Dredge with the global model failing to converge因为我的完整模型未能收敛,所以我尝试了此处描述的解决方法: Dredge with the global model failed to blend
But when I use a simplified model and rewrite the function in model$call$function, dredge ignores this change and uses the simplified model instead of the full model. But when I use a simplified model and rewrite the function in model$call$function, dredge ignores this change and uses the simplified model instead of the full model.
Is there maybe another workaround for functions of the glmmTMB-package? glmmTMB-package 的功能是否有另一种解决方法?
Below some example code:下面是一些示例代码:
# The full_model does not converge
full_model <- glmmTMB(y ~ x1 * x2 * (x3 + x4 + x5 + x6) + (1|RE1/RE1.1/RE1.2) + (1|RE2), data = df, family = "nbinom2")
# The simple_model does converge
simple_model <- glmmTMB(y ~ x1 + x2 + x3 + x4 + x5 + x6 + (1|RE1/RE1.1/RE1.2) + (1|RE2), data = df, family = "nbinom2")
# Change formula in the model
simple_model$call$formula <- y ~ x1 * x2 * (x3 + x4 + x5 + x6) + (1|RE1/RE1.1/RE1.2) + (1|RE2)
# use dredge, but this ignores the changed formula
dredge(simple_model)
Thank you!谢谢!
You would have to replace the elements of simple_model $ modelInfo $ allForm
.您必须替换
simple_model $ modelInfo $ allForm
的元素。 These are three formulas: "formula"
, "ziformula"
, and "dispformula"
, but in the case of your model only the first one is used.这是三个公式:
"formula"
、 "ziformula"
和"dispformula"
,但在您的 model 的情况下,仅使用第一个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.