SRH_TEST: Stata module for computing the Scheirer-Ray-Hare nonparametric two-way analysis of variance test
Ariel Linden
Statistical Software Components from Boston College Department of Economics
Abstract:
srh_test performs the Scheirer-Ray-Hare (SRH) test, a nonparametric alternative to two-way factorial ANOVA. The test was introduced by Scheirer, Ray, and Hare (1976) as an extension of the Kruskal-Wallis one-way test to designs with two crossed factors and their interaction. The command displays the standard ANOVA table augmented with two additional columns, H, the Scheirer-Ray-Hare test statistic for each term, and Prob>chi2, the p-value for H based on the chi-squared distribution with degrees of freedom equal to those of the term. Like the Kruskal-Wallis test, the SRH test does not require normality. It assumes that observations are independent and that the response variable is at least ordinal. The chi-squared approximation improves with larger sample sizes; results should be interpreted cautiously in small samples. The SRH test is intended for balanced factorial designs, where every combination of factor_var1 and factor_var2 levels contains the same number of observations. With unbalanced designs the test may produce unreliable results, because the sums of squares and MS(total) are distorted when cell sizes differ. If the design is unbalanced, alternative approaches should be considered. The SRH test has lower statistical power than parametric two-way ANOVA and is considered conservative relative to the parametric alternative (Dytham 2003). When the normality assumption of parametric ANOVA is plausible, that test is preferred. Post-hoc pairwise comparisons should be performed separately if significant effects are found.
Language: Stata
Requires: Stata version 11
Keywords: Scheirer-Ray-Hare test; two-way analysis of variance; ANOVA (search for similar items in EconPapers)
Date: 2026-04-07
Note: This module should be installed from within Stata by typing "ssc install srh_test". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/s/srh_test.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/s/srh_test.sthlp help file (text/plain)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s459664
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().