[R-sig-ME] post-hoc tests of lmerTest models using lsmeans
Yuqi Liu
yliu at psych.udel.edu
Wed Nov 29 22:32:28 CET 2017
Dear R experts,
I have a question on testing simple effects after finding out significant interaction using lmerTest. My data has two within-subjects fixed factors: Movement (synchronous or asynchronous), and Finger (one finger, or four fingers). The two levels of Movement factor were dummy-coded as 0.5 and -0.5, so were the two levels of Finger factor. The DV is called Shift. My model looks like this:
Shift.lm <- lmer(Shift~Movement*Finger+(1|subject), data=data)
There was a significant interaction of Movement and Finger, so I wanted to test simple effects by comparing synchronous and asynchronous movements at each level of Finger. I was planning to use lsmeans to do this, but I got two questions. First, when I just typed > lsmeans(Shift.lm) to look at descriptive info in each condition, R output nothing other than the headers:
> lsmeans(Shift.lm)
Least Squares Means table:
Estimate Standard Error DF t-value Lower CI Upper CI p-value
In addition, I typed the command below to test simple effects, but getting this error message:
> lsmeans(Shift.lm, pairwise~Finger * Movement ,adjust="tukey")
Error in match(x, table, nomatch = 0L) :
'match' requires vector arguments
I don't know what I am missing here, I also don't know if lsmeans is the best way to do it. Could anyone give any suggestions?
Thank you for your help,
Yuqi
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list