# pingouin.holm

pingouin.holm(pvals, alpha=0.05)[source]

P-values correction with Holm method.

Parameters
pvalsarray_like

Array of p-values of the individual tests.

alphafloat

Error rate (= alpha level).

Returns
rejectarray, bool

True if a hypothesis is rejected, False if not

pvals_correctedarray

P-values adjusted for multiple hypothesis testing using the Holm procedure.

bonf

Bonferroni correction

fdr

Benjamini/Hochberg and Benjamini/Yekutieli FDR correction

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 family-wise error rate and offers a simple test uniformly more powerful than the Bonferroni correction.

The Holm adjusted p-values are the running maximum of the sorted p-values divided by the corresponding increasing alpha level:

$\frac{\alpha}{n}, \frac{\alpha}{n-1}, ..., \frac{\alpha}{1}$

where $$n$$ is the number of test.

The full mathematical formula is:

$\widetilde {p}_{{(i)}}=\max _{{j\leq i}}\left\{(n-j+1)p_{{(j)}} \right\}_{{1}}$

Note that NaN values are not taken into account in the p-values correction.

References

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]