【问题标题】:Is there a workaround for non-convergence in glmmTMB models using the dredge function of MuMin?是否有使用 MuMin 的疏通功能解决 glmmTMB 模型中不收敛的解决方法?
【发布时间】:2019-11-19 13:39:20
【问题描述】:

我尝试将 MuMin-Package 的疏浚函数用于配备 glmmTMB 包的负二项式广义线性混合模型。

由于我的完整模型未能收敛,我尝试了此处描述的解决方法: Dredge with the global model failing to converge

但是当我使用简化模型并重写model$call$function中的函数时,dredge忽略了这个更改并使用简化模型而不是完整模型。

glmmTMB-package 的功能是否还有其他解决方法?

下面是一些示例代码:

# 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)

谢谢!

【问题讨论】:

    标签: r mumin


    【解决方案1】:

    您必须替换 simple_model $ modelInfo $ allForm 的元素。这是三个公式:"formula""ziformula""dispformula",但对于您的模型,仅使用第一个。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-01
      • 1970-01-01
      • 2015-04-28
      • 2023-02-12
      • 1970-01-01
      • 2015-11-13
      • 2012-10-08
      • 2020-08-02
      相关资源
      最近更新 更多