#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

# Contrasts in mixed ANOVA

Dear all,

I need help to explain the contrasts in ANOVA.

I have run a two-ways mixed anova (A = the within factor and B = the between factor). I have a main effect for A then B separately. I have also an interaction A*B.

To avoid the multiple comparisons in post hoc for the interaction A*B (due to a low number of subjects), I have performed custom contrasts based on my planned hypothesis. But, I don't understand the test that is performed in JASP, it's a T test ? I don't think so because I compared and it is not the same results...

If someone has the answer ? let me know ;-)

Thanks very much for any advice!

• Hi RobinM,

The contrast analysis and post hoc tests basically conduct t-tests on the subsets of your data (comparing one group to another, based on 1 or more categorical variables). For an example, see the attached screenshot:

We select all observations in group 3 of the variable facFive in the group Level.1 in RM Factor 1, and we compare those to the observations in group 5 of facFive in the group Level.1 in RM Factor 1.

since these observations are between subjects, the t-test conducted here is a two-sample t-test (with a different error term and therefore p-value). If you were to compare groups between the levels of the RM factor, this would be a paired samples t-test, so maybe that's where your results are different?

For an overview of posthoc tests, contrasts, and marginal means, see also my blogpost on the topic here: https://jasp-stats.org/2020/04/14/the-wonderful-world-of-marginal-means/

I hope this helps, please let me know if you have additional questions =)

Kind regards,

Johnny

• Dear Johnny,

I actually have a two groups (gender as between factor -> women or men) and five repeated-measures (time). My data set includes 10 women and 8 men.

Please find attached screenshot with the contrast result comparing women vs men for the time noted "POST" and in comparison, the two-sample t-test.

The results are not the same beacause like you said, there is a different error term, but I don't understand how is computed this error ? The degrees of freedom are different, how is it calculated for the contrasts ?

I have already seen your blogpost and it helped me a lot ;-)

Thank you again !

Have a nice day

Robin

• Hi Robin,

Im afraid I am not entirely sure how these are calculated. All I can say is that in the contrast analysis, the comparisons are conducted as one whole, which means that there are more groups being considered than just the 2 groups that are shown in the individual t-test, which leads to a higher degrees of freedom. Furthermore, there is pooling of the standard deviations across all these different groups.

I think this paper can shed some light on it, if you want to read about it further.

Kind regards

Johnny

• Okay no worries.

The simple fact that the contrasts consider more than 2 groups (in term of error) is really interesting and comforts me that these analyses are really well adapted to answer planned questions and so to avoid multiple comparisons.

Thank you

Robin