[R-sig-ME] post-hoc tests of lmerTest models using lsmeans
Chuck Cleland
clelandcm at gmail.com
Thu Nov 30 10:17:29 CET 2017
Try detaching the lmerTest package before using lsmeans.
This is what worked for me on a similar problem:
detach(package:lmerTest)
my_lsm <- lsmeans(Dp.reduced.fm, ~ Emotion|Go_NoGo)
pairs(my_lsm)
That gives pairwise comparisons of emotions at each level of Go_NoGo, with
the Tukey p value adjustment.
Hope this helps.
Regards,
Chuck
On Wed, Nov 29, 2017 at 4:32 PM, Yuqi Liu <yliu at psych.udel.edu> wrote:
> 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]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
--
Chuck Cleland, Ph.D.
Senior Research Scientist
NYU Rory Meyers College of Nursing
433 First Avenue, 7th floor
New York, NY 10010
tel: (212) 992-9417 (Tu, W, Th)
tel: (732) 512-0171 (M, F)
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list