使用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
,但又出现了另一个错误);另一种方法是使用glmer
和confint(glmmod, method = "Wald")
来确定置信区间。
我现在的问题是,glmmTMB
的估计超出了glmer
的Wald置信区间。此外,考虑到AIC和BIC,glmer
的结果似乎比glmmTMB
的结果要好。
我应该信任哪个结果?我该怎么办?
谢谢!