我有一个使用 GLMM 的全局模型,具有 5 个具有交互作用的固定效应以及两个随机效应。
x ~ a*b + a*c + a*d + a*e + (1|f) + (1|g)
我正在使用信息论方法,并在此全局模型上使用了 MuMIn
中的 dredge()
函数。
零模型的排名非常低(95),我认为这意味着固定效应对系统很重要,因为有 94 种可能的模型组合比随机模型组合更好。
但是,有同事问空模型中是否包含随机效应,否则的话,当然很多模型都比空模型好,因为它们考虑了随机效应的变化,但空模型不会。
但是,我假设该模型仍然具有这些随机效应,只是没有固定效应。这是正确的吗?
最佳答案
是的。
这是一个实验说明,dredge()
仅删除固定效应,将空模型保留为(截距+所有随机效应)
library(lme4) library(MuMIn) m1 = lmer(Reaction~Days+(Days|Subject),sleepstudy,na.action=na.fail,REML=FALSE) dd = dredge(m1) Fixed term is "(Intercept)" ## Global model call: lmer(formula = Reaction ~ Days + (Days | Subject), data = sleepstudy, ## REML = FALSE, na.action = na.fail) ## --- ## Model selection table ## (Intrc) Days df logLik AICc delta weight ## 2 251.4 10.47 6 -875.970 1764.4 0.0 1 ## 1 257.8 5 -887.738 1785.8 21.4 0 ## Models ranked by AICc(x) ## Random terms (all models): ## ‘Days | Subject’
The first point here is that the end of the printed output explicitly shows the random effects included for all terms.
Fitting the null model manually and comparing AICc with the table above:
m0 <- update(m1, . ~ . - Days)
formula(m0)
## Reaction ~ (Days | Subject)
AICc(m0)
## [1] 1785.821
关于r - Dredge MuMIn : when using a dredge on a GLMM, 空模型是否包含随机效应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60377979/