pingouin.holm

pingouin.
holm
(pvals, alpha=0.05)[source] Pvalues correction with Holm method.
 Parameters
 pvalsarray_like
Array of pvalues of the individual tests.
 alphafloat
Error rate (= alpha level).
 Returns
 rejectarray, bool
True if a hypothesis is rejected, False if not
 pvals_correctedarray
Pvalues adjusted for multiple hypothesis testing using the Holm procedure.
Notes
From Wikipedia:
In statistics, the Holmâ€“Bonferroni method (also called the Holm method) is used to counteract the problem of multiple comparisons. It is intended to control the familywise error rate and offers a simple test uniformly more powerful than the Bonferroni correction.
The Holm adjusted pvalues are the running maximum of the sorted pvalues divided by the corresponding increasing alpha level:
\[\frac{\alpha}{n}, \frac{\alpha}{n1}, ..., \frac{\alpha}{1}\]where \(n\) is the number of test.
The full mathematical formula is:
\[\widetilde {p}_{{(i)}}=\max _{{j\leq i}}\left\{(nj+1)p_{{(j)}} \right\}_{{1}}\]Note that NaN values are not taken into account in the pvalues correction.
References
Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian journal of statistics, 6570.
https://en.wikipedia.org/wiki/Holm%E2%80%93Bonferroni_method
Examples
>>> from pingouin import holm >>> pvals = [.50, .003, .32, .054, .0003] >>> reject, pvals_corr = holm(pvals, alpha=.05) >>> print(reject, pvals_corr) [False True False False True] [0.64 0.012 0.64 0.162 0.0015]