Solved – Post-hoc tests for 2×2 ANOVAs (Type II & III) with interactions in R

anovapost-hocr

I am trying to analyze data from an experiment using R and ran across a problem regarding the use of post-hoc tests with Type II & III ANOVAs. I only know of R functions that perform post-hoc tests based on Type I SS, such as TukeyHSD and glht. Others, such as HSD.test from the agricolae package do not seem to calculate tests for interactions.
Do post-hoc tests that also test for interaction terms exist for R that enable the use of Type II & III SS ANOVAs? Alternatively, is there a way to convert Anova objects (Type II or III, car package) to aov objects in order to use them with the TukeyHSD function?

Best Answer

If you really mean 2x2 as in "two factors, each at two levels" there is hardly a need for post hoc anything, because there is 1 df for each main effect and 1 df for interaction. You wouldn't use Tukey HSD for this, and if you used it, it'd be the same as the regular unadjusted tests because there is only one comparison in each family. But let me know if I misunderstand something. You might want to look at the lsmeans package and see if it offers the kind of comparisons you need.