help > post-hoc tests for 2×2 ANOVA in NBS
Showing 1-3 of 3 posts
Display:
Results per page:
Oct 30, 2025  09:10 PM | yihe weng
post-hoc tests for 2×2 ANOVA in NBS

Dear Andrew,


Thanks for developing such a great toolbox!


I have a question about how to interpret and follow up a 2×2 ANOVA design in NBS. I’m running a 2(A) × 2(B) ANOVA using an F-test. The design matrix has four columns:




  1. Condition A (coded as -1, 1)




  2. Condition B (coded as 1, -1)




  3. The interaction term (column 1 × column 2)




  4. A column of ones (intercept)




The interaction contrast [0, 0, 1, 0] is not significant, but I’d like to test the main effect of A using the contrast [1, 0, 0, 0].


The main effect of A turns out to be significant; should I then perform post-hoc comparisons (e.g., to test A1 > A2 and A1 < A2)?
Or in this case, would it be more appropriate to instead run two separate t-tests using the contrasts [1, -1] and [-1, 1], since the t-tests can explicitly examine both directions (A1 > A2 and A1 < A2)?


Thanks a lot for your time and advice!


Best,
Yihe

Oct 30, 2025  10:10 PM | yihe weng
RE: post-hoc tests for 2×2 ANOVA in NBS

Dear Andrew,


I came across one of your previous responses to a similar question, which I found very helpful. You mentioned that it is reasonable to run t-tests on each edge as a post-hoc analysis.
For example, if I identified around 900 significant edges for the main effect of A using the F-test, should I perform t-tests on each edge between A1 and A2 to separate the network into edges showing higher connectivity in A1 than A2 and those showing higher connectivity in A2 than A1?


Many thanks again!


Best,
Yihe

Nov 1, 2025  03:11 AM | Andrew Zalesky
RE: post-hoc tests for 2×2 ANOVA in NBS

Hi Yihe, 


Both options are reasonable - post hoc tests and running one-sided t-tests. It really depends on the goals of your analyses. 


Given that you have identified a relatively large network (900 edges), running two independent, one-sided t-tests may be helpful to localize the positive and negative effects. On the other hand the effects may be genuinely diffuse and not localisable by their nature.


You could consider summary measures such as the degree of nodes in the 900 edge graph, to make the interpretation of effects more manageable. 


Kind regards, 


Andrew 


 


Originally posted by yihe weng:



Dear Andrew,


I came across one of your previous responses to a similar question, which I found very helpful. You mentioned that it is reasonable to run t-tests on each edge as a post-hoc analysis.
For example, if I identified around 900 significant edges for the main effect of A using the F-test, should I perform t-tests on each edge between A1 and A2 to separate the network into edges showing higher connectivity in A1 than A2 and those showing higher connectivity in A2 than A1?


Many thanks again!


Best,
Yihe