r - Dredge MuMIn : when using a dredge on a GLMM, 空模型是否包含随机效应?

标签 r data-modeling information-theory mumin

我有一个使用 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/

相关文章:

r - R 中的固定效应回归(具有大量虚拟变量)

r - 短文本列表,要选择至少有 2 个字母不同的行

swift - 使用 Enum 和 Struct 进行静态和动态截面建模 - Swift 4

artificial-intelligence - 决策树是试图最大化信息增益还是熵?

r - 使用 rpy2 将 NULL 从 Python 转换为 R

oracle - 从现有Oracle数据库生成数据库图/ER图的工具?

php - 多对多关系数据库的复合FK表

algorithm - 是否有适用于一系列花车的编辑距离版本?

graph - 如何计算图的熵?

r - 如何对 dplyr 中的多个变量进行排名