Skip to content

BCompare groups · Guide test 052

Dwass–Steel–Critchlow–Fligner or Steel–Dwass family

Performs simultaneous pairwise comparisons based on ranks recomputed for each pair; related historical formulations are grouped here.

Runs in CodeSplashPython (calls R) example not runR example not run

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Kruskal–Wallis test, choose Pairwise test = Dwass–Steel–Critchlow–Fligner. In Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …), choose Comparison = Dwass–Steel–Critchlow–Fligner.

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Dwass–Steel–Critchlow–Fligner test

4
10
0.65

Group i has true mean (i − 1) × spread.

1.00
0.050

Your data

Drag a point or use ↑/↓ to change it
Group 1mean 0.49Group 2mean 0.88Group 3mean 1.23Group 4mean 1.73

If H₀ were true

q = 3.63
  1. The reference: how q varies across samples when H₀ is true, the studentized range q(4, ∞).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .050).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The whole family

PairHodges–Lehmann shiftpp adj.
.112.386
.131.430
.010.050
.597.952
.096.343
.290.715

6 pairs; adjusted by studentized range, ∞ df. The highlighted row is the one in the reference pane (the most extreme by default).

The formula

qij=2 Uij−ninj/2Var(Uij)∼qk,∞q_{ij}=\sqrt2\,\dfrac{U_{ij}-n_in_j/2}{\sqrt{\mathrm{Var}(U_{ij})}} \sim q_{k,\infty}

With your numbers

q=3.63,padj=0.05q = 3.63,\qquad p_{adj} = 0.05
UijU_{ij}
Mann–Whitney U ranked within the pair only
qk,∞q_{k,\infty}
studentized range with infinite df

The verdict

q = 3.63, p = .050, HL = −1.34

p ≤ α = .050: reject H₀

Effect size: Group 1 − Group 4 (Hodges–Lehmann shift) HL = −1.336

Each pair ranked on its own, so other groups' spreads cannot leak in; simultaneous through the studentized range.

Statistic
3.635
p-value
0.0499
Dwass–Steel–Critchlow–Fligner test on Group 1: n = 10; Group 2: n = 10; Group 3: n = 10; Group 4: n = 10: q = 3.63, p = .050, HL = −1.34. The p-value is below α = .050, so the data are hard to reconcile with H0.

Dwass–Steel–Critchlow–Fligner test on Group 1: n = 10; Group 2: n = 10; Group 3: n = 10; Group 4: n = 10: q = 3.63, p = .050, HL = −1.34. The p-value is below α = .050, so the data are hard to reconcile with H₀.

Question and hypotheses

H0ij: identical distributions for each pair of groups.

Assumptions

Independent observations and independent groups; ordinal or quantitative measurements. The permutation null is identical group distributions. A location or median interpretation additionally needs comparable distribution shapes.

Formula

qij=2∣Uij−ninj/2Var⁡0(Uij)∣q_{ij}=\sqrt2\left|\frac{U_{ij}-n_in_j/2}{\sqrt{\operatorname{Var}_0(U_{ij})}}\right|

Parameters and notation

Uij is based on ranks within that pair only; without ties Var0(Uij)=ninj(ni+nj+1)/12. Use tie corrections when required.

Structure of the method

For each group pair, recompute ranks using only that pair, obtain a tie-adjusted U-based standardized contrast, and calibrate simultaneous extremes using the specified range-type or permutation formulation. Pairwise re-ranking is the distinguishing computational step; globally ranked Dunn or Nemenyi statistics are not interchangeable inputs.

Estimated and nuisance parameters

Estimate pair-specific rank sums and tie-adjusted null variances. Sample sizes and the planned group family define the comparison structure. Because ranks are rebuilt separately, a pair's unadjusted statistic is not affected by observations in an unrelated third group, although simultaneous calibration can still change when the family expands.

Settings and design choices

Specify the exact historical variant, asymptotic versus permutation calibration, direction convention, alpha, and tie rule. Some software labels related range-based implementations under the combined family name. State the function and reference distribution instead of claiming all Steel–Dwass or DSCF implementations return identical finite-sample probabilities.

Fitting and adaptation

Recompute pair ranks after changes to either group's data, and rerun the joint correction when family membership changes. A permutation implementation must reproduce the chosen simultaneous statistic, not merely permute each pair independently and ignore their shared observations. Adaptation to blocked designs requires a different dependence-aware comparison procedure.

Sensitivity and robustness

Small sample sizes and extensive ties create coarse statistics and can make asymptotic range tails inaccurate. Unequal distribution shapes complicate median interpretations. Exactness claims need an explicit conditioning/randomization argument and algorithm; the presence of ranks alone does not make every multiple-comparison p-value exact.

How to use and calibrate

The Dwass–Steel–Critchlow–Fligner/Steel–Dwass family uses pairwise rank statistics with simultaneous range type or permutation calibration; state the variant.

Example application

Compare every pair of independent ordinal treatment groups.

Interpretation and pitfalls

Watch out

This family is not identical to globally ranked Dunn or Nemenyi. “Exact” and asymptotic implementations can differ.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Read the matrix of adjusted p-values. This is an independent-group example; Nemenyi also has a separate Friedman/block version. The first factor level is control for many-to-one procedures.

Python · invokes R

Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: PMCMRplus

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
d <- data.frame(value=c(rnorm(20),rnorm(20,.4),rnorm(20,.8)), group=factor(rep(c("A","B","C"),each=20)))
print(PMCMRplus::dscfAllPairsTest(value~group,data=d))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Not run — Syntax checked; runtime not verified in the final environment · needs PMCMRplus

set.seed(2026)
d <- data.frame(value=c(rnorm(20),rnorm(20,.4),rnorm(20,.8)), group=factor(rep(c("A","B","C"),each=20)))
print(PMCMRplus::dscfAllPairsTest(value~group,data=d))

Sources

Statistics guide v4 (historical):
Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 052, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT052.