statsmodels.stats.multitest.fdrcorrection_twostage¶

statsmodels.stats.multitest.
fdrcorrection_twostage
(pvals, alpha=0.05, method='bky', iter=False, is_sorted=False)[source]¶ (iterated) two stage linear stepup procedure with estimation of number of true hypotheses
Benjamini, Krieger and Yekuteli, procedure in Definition 6
 Parameters
 pvalsarray_like
set of pvalues of the individual tests.
 alpha
float
error rate
 method{‘bky’, ‘bh’)
see Notes for details
 ‘bky’  implements the procedure in Definition 6 of Benjamini, Krieger
and Yekuteli 2006
‘bh’  the two stage method of Benjamini and Hochberg
 iterbool
 Returns
Notes
The returned corrected pvalues are specific to the given alpha, they cannot be used for a different alpha.
The returned corrected pvalues are from the last stage of the fdr_bh linear stepup procedure (fdrcorrection0 with method=’indep’) corrected for the estimated fraction of true hypotheses. This means that the rejection decision can be obtained with
pval_corrected <= alpha
, wherealpha
is the original significance level. (Note: This has changed from earlier versions (<0.5.0) of statsmodels.)BKY described several other multistage methods, which would be easy to implement. However, in their simulation the simple twostage method (with iter=False) was the most robust to the presence of positive correlation
TODO: What should be returned?