#StackBounty: #anova #multiple-comparisons #post-hoc #tukey-hsd Tukey pairwise grouping after 2-way ANOVA

Bounty: 50

I have a dataset like this,

grouping1   grouping2   value  
A           Y           6.32  
B           Y           4.2  
A           X           2.3  
A           X           4.45  
C           Y           3.5  
C           X           1.67  
B           X           6.24  

I wanted to see if there were differences on the values for the different grouping features.
So, I ran a 2-way ANOVA and I get p-values for the values for: grouping1, grouping2 and the interaction between grouping1 and grouping2.
I get something like:

Variable                p-value
Grouping1               .00001  
Grouping2               .0003  
Grouping1*Grouping2     .9  

Meaning that there are differences in the groups but interaction effect is not significant.

Now, provided the assumptions are fulfilled I can make a tukey pairwise test to see which groups are different (I use statsmodels.stats.multicomp.pairwise_tukeyhsd). My question is,

Q1: Is it valid to run 3 pairwise tukey tests for,

  1. All the pairs of grouping1 where grouping2 is X
  2. All the pairs of grouping1 where grouping2 is Y
  3. All the pairs of grouping1 ignoring grouping2

or only 1 and 2 are valid? My reasoning is that provided that the interactions are not significant, 3 is also valid.

Q2: Is doing 3 the same as running a one way ANOVA over the data ignoring grouping2, get a significant result and then run a tukey pairwise?

(I saw many questions about interpreting Tukey after 2-way anova, but none really answered this specific point).

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.