Evaluation, diagnostics, benchmarks, and additional tests · Evaluation, diagnostics, benchmarks, and additional hypothesis tests · EVA055 · Diagnostic
Holm and Benjamini–Hochberg multiplicity procedures
Control different error rates when many model, subgroup, or metric hypotheses are tested.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …) Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Complete calculation
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through posthoc.pairwise. The reference's example ran here in one language.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Control different error rates when many model, subgroup, or metric hypotheses are tested.
Question / hypotheses
Is the goal familywise error control (Holm) or expected false discovery proportion control (BH)?
Architecture / computational structure
Sort the full planned family of valid p-values. Holm applies successively relaxed familywise thresholds and stops at the first failure; BH identifies the largest passing rank for its step-up false-discovery rule. Adjusted p-values require monotonic cumulative extrema and restoration of original hypothesis order.
Assumptions
Individual p-values must be valid. Holm permits arbitrary dependence; standard BH guarantees require independence or suitable positive dependence. Define the family before selective reporting.
Formula / computational definition
Parameters and notation
m is the full family size; alpha or q is a prespecified error target. These are inferential design choices, not performance hyperparameters to optimize.
Fitting, fine-tuning, and adaptation
No model parameters are fitted. Choose the family and error-control target prospectively. Repeated model or prompt searches can create a larger inferential family than the final table shows; include those analyses or use a valid selective/confirmatory design. Changing the dependence assumptions may require a different procedure, such as BY, rather than merely a different q.
How to use and calibrate
Retain all planned comparisons, choose the control objective, compute adjusted decisions, and report effect sizes and intervals. Treat exploratory discoveries as requiring replication.
Example application
Compare multiple model architectures across prespecified primary outcomes without reporting only the smallest raw p-value.
Interpretation / pitfalls
Watch out
BH does not control the probability of any false claim. Adjusting only the reported subset ignores hidden search; validity cannot be restored by post hoc arbitrary filtering.
Python and R code examples
Scope: Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
Validation: Python — Executed successfully on synthetic inputs. R — reviewed but not executed in this environment. Python dependencies are explicit imports; R uses base R unless a package/bridge is explicitly named.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline. · needs numpy
import numpy as np
p=np.array([.004,.02,.04,.2]); m=len(p); order=np.argsort(p)
holm=np.minimum(1,np.maximum.accumulate((m-np.arange(m))*p[order]))
out=np.empty(m); out[order]=holm; print(out)
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
p <- c(.004,.02,.04,.2)
print(p.adjust(p,method="holm")); print(p.adjust(p,method="BH"))
Sources
- Source 1stat.ethz.ch
From the CodeSplash reference, entry EVA055.