Followup tests
The text below continues on from this example of factorial Anova.
If we want to look at post-hoc pairwise tests we can use the the emmeans()
function from the emmeans::
package. By default Tukey correction is applied
for multiple comparisons, which is a reasonable default:
em <- emmeans::emmeans(eysenck.model, pairwise~Age:Condition)
em$contrasts
contrast estimate SE df t.ratio p.value
Young,Counting - Older,Counting 0.5 1.27 90 0.395 1.0000
Young,Counting - Young,Rhyming 0.1 1.27 90 0.079 1.0000
Young,Counting - Older,Rhyming -0.6 1.27 90 -0.474 1.0000
Young,Counting - Young,Adjective -4.0 1.27 90 -3.157 0.0633
Young,Counting - Older,Adjective -7.8 1.27 90 -6.157 <.0001
Young,Counting - Young,Imagery -6.4 1.27 90 -5.052 0.0001
Young,Counting - Older,Imagery -10.6 1.27 90 -8.367 <.0001
Young,Counting - Young,Intention -5.0 1.27 90 -3.947 0.0058
Young,Counting - Older,Intention -12.3 1.27 90 -9.709 <.0001
Older,Counting - Young,Rhyming -0.4 1.27 90 -0.316 1.0000
Older,Counting - Older,Rhyming -1.1 1.27 90 -0.868 0.9970
Older,Counting - Young,Adjective -4.5 1.27 90 -3.552 0.0205
Older,Counting - Older,Adjective -8.3 1.27 90 -6.551 <.0001
Older,Counting - Young,Imagery -6.9 1.27 90 -5.446 <.0001
Older,Counting - Older,Imagery -11.1 1.27 90 -8.761 <.0001
Older,Counting - Young,Intention -5.5 1.27 90 -4.341 0.0015
Older,Counting - Older,Intention -12.8 1.27 90 -10.103 <.0001
Young,Rhyming - Older,Rhyming -0.7 1.27 90 -0.553 0.9999
Young,Rhyming - Young,Adjective -4.1 1.27 90 -3.236 0.0511
Young,Rhyming - Older,Adjective -7.9 1.27 90 -6.236 <.0001
Young,Rhyming - Young,Imagery -6.5 1.27 90 -5.131 0.0001
Young,Rhyming - Older,Imagery -10.7 1.27 90 -8.446 <.0001
Young,Rhyming - Young,Intention -5.1 1.27 90 -4.025 0.0044
Young,Rhyming - Older,Intention -12.4 1.27 90 -9.787 <.0001
Older,Rhyming - Young,Adjective -3.4 1.27 90 -2.684 0.1963
Older,Rhyming - Older,Adjective -7.2 1.27 90 -5.683 <.0001
Older,Rhyming - Young,Imagery -5.8 1.27 90 -4.578 0.0006
Older,Rhyming - Older,Imagery -10.0 1.27 90 -7.893 <.0001
Older,Rhyming - Young,Intention -4.4 1.27 90 -3.473 0.0260
Older,Rhyming - Older,Intention -11.7 1.27 90 -9.235 <.0001
Young,Adjective - Older,Adjective -3.8 1.27 90 -2.999 0.0950
Young,Adjective - Young,Imagery -2.4 1.27 90 -1.894 0.6728
Young,Adjective - Older,Imagery -6.6 1.27 90 -5.209 0.0001
Young,Adjective - Young,Intention -1.0 1.27 90 -0.789 0.9986
Young,Adjective - Older,Intention -8.3 1.27 90 -6.551 <.0001
Older,Adjective - Young,Imagery 1.4 1.27 90 1.105 0.9830
Older,Adjective - Older,Imagery -2.8 1.27 90 -2.210 0.4578
Older,Adjective - Young,Intention 2.8 1.27 90 2.210 0.4578
Older,Adjective - Older,Intention -4.5 1.27 90 -3.552 0.0205
Young,Imagery - Older,Imagery -4.2 1.27 90 -3.315 0.0411
Young,Imagery - Young,Intention 1.4 1.27 90 1.105 0.9830
Young,Imagery - Older,Intention -5.9 1.27 90 -4.657 0.0005
Older,Imagery - Young,Intention 5.6 1.27 90 4.420 0.0011
Older,Imagery - Older,Intention -1.7 1.27 90 -1.342 0.9409
Young,Intention - Older,Intention -7.3 1.27 90 -5.762 <.0001
P value adjustment: tukey method for comparing a family of 10 estimates
Both cell means and pairwise contrasts are shown here. There is much more detail on computing pairwise comparisons and other types of contrasts in the section on multiple comparisons, including ways to extract and present your comparisons in APA format.