There are many posts about post hoc testing but I did not find an answer to my question.
my model:
mod<-lmer(T ~ A*B + C + (1|D), REML=TRUE, data=dat)
A,B,C
are categorical with 2, 4 and 2 levels respectively.
I want to check the effect of the variable A
on T
(I use the package lsmeans
but any other suggestion is welcome):
lsmeans(mod, pairwise~A)
I receive the warning:
NOTE: Results may be misleading due to involvement in interactions
*
How can I evaluate the effect of A and A only considering the interaction?
NB: I know I can use lsmeans(mod, pairwise ~ A:B, adjust = "tukey")
but then I obtain the effect of A for each level of B.
*I also carefully checked the documentation of the package lsmeans
and there is only one example with interactions. However it turns out that the interaction did not influence the results and so how to include it in the results is not discussed.