[R-sig-ME] Post-hoc analysis for the effect of a lower-order interaction

Fan, L. |@|@n @end|ng |rom vu@n|
Thu Feb 3 20:45:47 CET 2022

Hi everyone,

I recently got stuck in the post-hoc analysis for my model’s interactions. 

Let’s say the interaction in the model is A:B:C, with the three variables being all two-level factors. I want to check if the effect of A:B varies across the two levels of C (getting a t-test between C’s two levels, as what we get from the pairs() function for getting the difference of marginal means/slopes in a 2-way interaction).

I’ve tried both emmeans and emtrends functions but failed. It always ended up expanding the higher-order interaction of all the three variables into basic cell contrasts (i.e. on specific levels of A and B), but not provided the overall contrast of how the lower-order interaction (A:B) performs in general on the two different levels of C. I also tried the joint_test function, but there is only the output of coefficients but not a between-level comparison on C. I am looking for the estimations of A:B on the two levels of C, and a t-test between these two estimations at the same time. Is this possible only using the emmeans package? Can I have some hints from you guys?

Thanks a lot!


More information about the R-sig-mixed-models mailing list