When you select the Multiple Comparisons option, you can choose the initial comparison to be with all pairwise comparisons. The All Pairwise Comparisons option shows either a Tukey HSD All Pairwise Comparisons or Student’s t All Pairwise Comparisons report (Hsu 1996; Westfall et al. 2011). Tukey HSD comparisons are constructed so that the significance level applies jointly to all pairwise comparisons. In contrast, for Student’s t comparisons, the significance level applies to each individual comparison. When making several pairwise comparisons using Student’s t tests, the risk that one of the comparisons incorrectly signals a difference can well exceed the stated significance level. For an example, see “Example of Tukey HSD All Pairwise Comparisons”.
At the top of the Tukey HSD All Pairwise Comparisons report you find:
Quantile
The critical value for the test. Note that, for Tukey HSD, the quantile is , where q is the appropriate percentage point of the Studentized range statistic.
Adjusted DF
The degrees of freedom used in constructing the confidence intervals.
Adjustment
Describes the method used to obtain the critical value:
Tukey
Provides exact critical values and p-values. Used when the means are uncorrelated and have equal variances, or when the design is variance-balanced.
Tukey-Kramer
Provides approximate critical values and p-values. Used when exact values cannot be obtained.
For technical details, see the GLM Procedure chapter in SAS Institute Inc. (2024b).
The top of the Student’s t All Pairwise Comparisons report shows the Quantile, or critical value, for the t test and DF, the degrees of freedom used for the t test.
Both Tukey HSD and Student’s t compare all pairs of levels. For each pairwise comparison, the All Pairwise Differences report shows:
• The levels being compared
• Difference - the estimated difference between the means
• Std Error - the standard error of the difference
• t Ratio - the t ratio for the test of whether the difference is zero
• Prob > |t| - the p-value for the test
• Lower and Upper limits for a confidence interval for the difference in means
This report also contains a plot column that shows a visual representation of the confidence interval for each difference between means. Colors indicate which differences are significant.
This plot, sometimes called a diffogram or a mean-mean scatterplot, displays the confidence intervals for all means pairwise differences. (See “Example of Tukey HSD All Pairwise Comparisons” for an example.) Colors indicate which differences are significant.
The plot shows a reference line as an upwardly sloping line on the diagonal. This line represents points where the two means are equal. Each line segment corresponds to a confidence interval for a pairwise comparison. The coordinates of the point displayed on the line segment are the means for the corresponding groups. Hover over one of these points to show a tooltip that identifies the groups being compared and shows the estimated difference. If a line segment crosses the line on the diagonal, then the means can be equal and the comparison is not significant.
The Pairwise Comparisons Scatterplot has the following option:
Show Reference Lines
Displays reference grid lines for the points on the scatterplot. This is not recommended if there are many points in the scatterplot. If there are many points, it is better to hover over the points to view the tooltip labels.
Use this option to display a report that illustrates significant and non-significant comparisons with connecting letters. Levels not connected by the same letter are significantly different. Levels connected by the same letter are not significantly different.
This option creates a data table whose columns contain the levels of the effect, the connecting letters, the least squares means, their standard errors, and confidence intervals. The data table contains a script called Bar Chart that produces a colored bar chart of the least squares means with their confidence intervals superimposed. The levels are arranged in decreasing order of least squares means.