我正在做一个阅读实验,比较 4 种条件下 2 组的阅读时间。我运行了一个 lmer 模型,其中阅读条件(因子 w 4 水平)和组(因子 w 2 水平)作为预测变量,注视持续时间作为因变量(数字)。
m1= lmer(IA_FIRST_FIXATION_DURATION ~ condition * group + (1 + condition + group | PARTICIPANT_ID) + (1 | TRIAL_LABEL), data=subset(NWC1, IA_ID == "2"))
这是输出的一部分:
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 232.341 8.802 106.000 26.395 < 2e-16 ***
conditionFamUn -2.122 11.193 462.900 -0.190 0.849742
conditionNovelInf 37.234 11.547 146.300 3.225 0.001556 **
conditionNovelUn 44.425 11.897 133.100 3.734 0.000278 ***
groupL2 68.245 15.381 60.200 4.437 3.95e-05 ***
conditionFamUn:groupL2 -11.414 15.710 586.700 -0.727 0.467783
conditionNovelInf:groupL2 -15.760 16.536 127.300 -0.953 0.342374
conditionNovelUn:groupL2 -20.165 16.948 117.000 -1.190 0.236515
我需要进行成对比较,过去我使用过 lsmeans。现在它已被弃用,当我使用 lsmeansLT 时,我收到以下错误消息:
lsmeansLT(m1, pairwise~ condition *group)
Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments
我不明白此错误消息的含义。
我也尝试了 difflsmeans 并且它有效(请参阅下面的示例输出)。但是 difflsmeans 不会更正多重比较的 p 值。
> difflsmeans(m1, test.effs=NULL, ddf="Satterthwaite")
Differences of LSMEANS:
Estimate Standard Error DF t-value Lower CI Upper CI p-value
condition:group FamInf L1 - FamUn L1 2.1 11.19 463.0 0.19 -19.87 24.12 0.850
condition:group FamInf L1 - NovelInf L1 -37.2 11.55 146.3 -3.22 -60.05 -14.41 0.002 **
condition:group FamInf L1 - NovelUn L1 -44.4 11.90 133.1 -3.73 -67.96 -20.89 3e-04 ***
condition:group FamInf L1 - FamInf L2 -68.2 15.38 60.2 -4.44 -99.01 -37.48 <2e-16 ***
condition:group FamInf L1 - FamUn L2 -54.7 14.65 83.5 -3.73 -83.85 -25.57 3e-04 ***
condition:group FamInf L1 - NovelInf L2 -89.7 18.60 48.1 -4.82 -127.12 -52.31 <2e-16 ***
任何人都可以提供解决方案吗?我可以理解并修复 lsmeansLT 的错误,或者以某种方式调整 p 值并继续使用 difflsmeans。(我已经加载了 lsmeans 和 lmerTest 库)谢谢!