I am doing a reading experiment, comparing reading times in 2 groups across 4 conditions. I ran a lmer model with reading condition (factor w 4 levels) and group (factor w 2 levels) as the predictors and fixation duration as the dependent variable (numeric).
m1= lmer(IA_FIRST_FIXATION_DURATION ~ condition * group + (1 + condition + group | PARTICIPANT_ID) + (1 | TRIAL_LABEL), data=subset(NWC1, IA_ID == "2"))
Here is part of the output:
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
I need to do pairwise comparisons and in the past I have used lsmeans. Now it is deprecated and when I use lsmeansLT, I get the following error message:
lsmeansLT(m1, pairwise~ condition *group)
Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments
I do not understand what this error message means.
I also tried difflsmeans and it works (see sample output below). But difflsmeans does not correct the p value for multiple comparisons.
> 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 ***
Can anyone provide a solution? I can either understand and fix the error of lsmeansLT or somehow adjust the p values and keep using difflsmeans. (I have loaded the lsmeans and lmerTest libraries) Thank you!