Skip to content

Scheirer-Ray-Hare Test

Hypothesis Testing

A non-parametric extension of the Kruskal-Wallis test to two-factor designs, serving as the rank-based alternative to two-way ANOVA.

When to Use

Use this test when you have two categorical factors and a continuous or ordinal outcome but cannot assume normality. For example, testing the effects of treatment type and sex on a non-normally distributed pain score.

Assumptions

  • Observations are independent.
  • The dependent variable is at least ordinal.
  • No strong interaction effect is present (the test has low power for detecting interactions).

Required Inputs

InputTypeNotes
ValuesNumericResponse variable (continuous or ordinal)
Factor 1CategoricalFirst grouping factor
Factor 2CategoricalSecond grouping factor

Output Metrics

MetricWhat it means
Factor A — DFDegrees of freedom for the first factor.
Factor A — SS (Ranks)Sum of squares of ranks for the first factor.
Factor A — H (Chi-Square)H statistic for the first factor, approximated by chi-square.
Factor A — Pr > Chi-SquareP-value for the first factor.
Factor B — DFDegrees of freedom for the second factor.
Factor B — SS (Ranks)Sum of squares of ranks for the second factor.
Factor B — H (Chi-Square)H statistic for the second factor.
Factor B — Pr > Chi-SquareP-value for the second factor.
A*B — H (Chi-Square)H statistic for the interaction.
A*B — Pr > Chi-SquareP-value for the interaction effect.
NNumber of observations in each cell.
MedianMedian of each cell.
Q1First quartile of each cell.
Q3Third quartile of each cell.
IQRInterquartile range of each cell.
Mean RankAverage rank within each cell.

Interpretation

  • Interpret the H statistics as you would F-statistics from two-way ANOVA, but based on ranks instead of raw values.
  • A significant main effect means that the ranks differ across levels of that factor.
  • The interaction test has relatively low statistical power. A non-significant interaction does not necessarily mean there is no interaction.
  • Cell-level medians and mean ranks provide descriptive context for the test results.

Common Pitfalls

  • The Scheirer-Ray-Hare test has notoriously low power for detecting interaction effects. If the interaction is your primary interest, consider aligned rank transform (ART) ANOVA instead.
  • The chi-square approximation for the H statistic requires reasonable cell sizes. Very small cells produce unreliable p-values.
  • This test does not have a well-established post-hoc procedure. Separate Mann-Whitney tests with Bonferroni correction are sometimes used as a follow-up.

How It Works

  1. Rank all observations across the entire dataset from smallest to largest.
  2. Perform a standard two-way ANOVA on the ranked data instead of the original values.
  3. Compute H statistics by dividing each sum of squares of ranks by the total mean square of ranks. Each H follows a chi-square distribution under the null hypothesis.

Citations

References

  • Scheirer, C. J., Ray, W. S., & Hare, N. (1976). The analysis of ranked data derived from completely randomized factorial designs. Biometrics, 32(2), 429-434.