具有许多观察值的 lmerTest 模型的错误 post hoc emmeans

Error post hoc emmeans for lmerTest model with many observations

我 运行 一个带有 lmerTest 的混合模型,我需要一个 post-hoc 测试。

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

我将不胜感激帮助或以其他方式 运行 一个 post-hook 因为我尝试过的其他方式也没有奏效。 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, globally, '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 时它根本不起作用”,我怀疑真正发生的是计算机似乎锁定了;这是因为获得萨特思韦特自由度需要大量的计算。

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