约束函数的错误应用于glmer混合模型

时间:2019-06-17 14:23:34

标签: r lme4 mixed-models confidence-interval

使用glmmod <- lme4::glmer(formula, family = Gamma(link = "identity"), data = df)计算模型后,当我要求confint(glmmod)时出现错误

> confint(glmmod)
Computing profile confidence intervals ...
Error in profile.merMod(object, which = parm, signames = oldNames, ...) : 
  can't (yet) profile GLMMs with non-fixed scale parameters

类似于@ Ben-Bolker在using profile and boot method within confint option, with glmer model中所述。但是,如果我按照他的建议尝试confint(glmmod,method="boot")(无论是否使用nsim),我都会收到错误消息

Error in if (const(t, min(1e-08, mean(t, na.rm = TRUE)/1e+06))) { : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In rgamma(nsim * length(ftd), shape = shape, rate = shape/ftd) :
  NAs produced
2: In bootMer(object, FUN = FUN, nsim = nsim, ...) :
  some bootstrap runs failed (500/500)

然后,我尝试了两种方法:一种是按照Ben Bolker的回答建议,使用glmmTMB(也尝试了glmmADMB,但又出现了另一个错误);另一种方法是使用glmerconfint(glmmod, method = "Wald")来确定置信区间。

我现在的问题是,glmmTMB的估计超出了glmer的Wald置信区间。此外,考虑到AIC和BIC,glmer的结果似乎比glmmTMB的结果要好。

我应该信任哪个结果?我该怎么办?

谢谢!

0 个答案:

没有答案