MultipleComparisonCorrection#

Correction methods for multiple comparison tests.

correct_p_values(pvalues, method='BH')[source]#

Corrects p-values for multiple testing using various methods.

Arguments

pvaluesarray

List of p values to be corrected.

methodstr

Optional method to use: ‘BH’ = ‘FDR’ = ‘Benjamini-Hochberg’, ‘B’ = ‘FWER’ = ‘Bonferoni’.

Returns

qvaluesarray

Corrected p values.

References

Notes

Modified from http://statsmodels.sourceforge.net/ipdirective/generated/scikits.statsmodels.sandbox.stats.multicomp.multipletests.html.

estimate_q_values(pvalues, m=None, pi0=None, verbose=False, low_memory=False)[source]#

Estimates q-values from p-values.

Arguments

pvaluesarray

List of p-values.

mint or None

Number of tests. If None, m = pvalues.size

pi0float or None

Estimate of m_0 / m which is the (true null / total tests) ratio. If None estimation via cubic spline.

verbosebool

Print info during execution

low_memorybool

If true, use low memory version.

Returns

qvaluesarray

The q values.

Notes

  • The q-value of a particular feature can be described as the expected proportion of false positives among all features as or more extreme than the observed one.

  • The estimated q-values are increasing in the same order as the p-values.

References