具有许多观察结果的 lmerTest 模型的事后 emmeans 错误

问题描述

我使用 lmerTest 运行了一个混合模型,我需要一个事后测试。

以下是模型,每次都试一试。然后,我使用 emmeans 但得到以下错误(可能是因为大量观察)。

我将不胜感激,因为我尝试过的其他方法也不起作用。 P. S. 当我尝试添加参数 'lmerTest.limit = 13812' 时,它根本不起作用。

lmerTest :: lmer (RT ~ condition * pronoun * objectification_center +
(1+ pronoun| subject_ID),data = data)```


emm1 = emmeans(mixed_model_RT_comp,specs = pairwise ~ condition:pronoun)

 Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
To enable adjustments,add the argument 'pbkrtest.limit = 13812' (or larger)
[or,globally,'set emm_options(pbkrtest.limit = 13812)' or larger];
but be warned that this may result in large computation time and memory use.
Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
To enable adjustments,add the argument 'lmerTest.limit = 13812' (or larger)
[or,'set emm_options(lmerTest.limit = 13812)' or larger];
but be warned that this may result in large computation time and memory use.
NOTE: Results may be misleading due to involvement in interactions```

解决方法

从我在这个问题中读到的内容,你确实得到了结果。就这样做:

emm1

你会看到它们。

OP 中显示的消息只是——消息,而不是错误。 由于您有如此多的观察结果,因此它使用渐近结果(z 检验而不是 t 检验,由 Inf 自由度表示)。这绕过了使用 Kenward-Roger 或 Satterthwaite 自由度所需的极其繁重的计算。通过指定 emmeans(...,lmer.df = "asymp"),您可以获得相同的结果,无需前两条消息中的任何一条。

当您说“当我尝试添加参数 lmerTest.limit = 13812 时,它根本不起作用”,我怀疑真正发生的是计算机似乎锁定了;这是因为获得 Satterthwaite 自由度需要大量的计算。

第三条消息表示,在涉及交互时计算边际均值可能不是一个好主意。您应该进行一些绘图或测试或其他操作,以确保对 objectification_center 取平均值是合理的。查看 summary(mixed_model_RT_comp) 并查看与 objectification_center 交互的测试。如果其中任何一个很重要,您可能不应该对该因素进行平均,而是使用 specs = pairwise ~ condition:pronoun | objectification_denter。如果这些交互作用不显着,请考虑在没有这些交互作用的情况下重新拟合模型。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...