If I use lme
for mixed ANOVA as follow
lme_model=lme(dv ~ between*within, data frame, random=~1|ID, correlation=corCompSymm(form=~1|ID))
how can I perform between group comparison for every level of within factor?
This great answer advice to use anova
with L
argument. But I can't understand how.
Thanks for the help
lsmeans
andmultcomp
packages ? $\endgroup$Lsmeans
is what I am looking for.multcomp
withsummary(glht(lme_model, linfct=mcp(between = "Tukey")), test = adjusted(type = "fdr"))
lead to warningIn mcp2matrix(model, linfct = linfct) : covariate interactions found -- default contrast might be inappropriate
. Islsmeans
concerned about covariate interactions? $\endgroup$lsmeans(lme_model, pairwise ~ between | within)
. $\endgroup$multcomp
and/orlsmeans
returns a warning in such situations. $\endgroup$