statsmodels.stats.multitest.fdrcorrection¶
-
statsmodels.stats.multitest.fdrcorrection(pvals, alpha=
0.05, method='indep', is_sorted=False)[source]¶ p值校正用于错误发现率。
这涵盖了适用于独立或正相关测试的Benjamini/Hochberg方法,以及适用于一般或负相关测试的Benjamini/Yekutieli方法。
- Parameters:¶
- pvalsarray_like, 1d
单个测试的p值集合。
- alpha
float,optional 族错误率。默认为
0.05。- method{‘i’, ‘indep’, ‘p’, ‘poscorr’, ‘n’, ‘negcorr’},
optional 用于FDR校正的方法。
{'i', 'indep', 'p', 'poscorr'}均指fdr_bh(适用于独立或正相关测试的Benjamini/Hochberg方法)。{'n', 'negcorr'}均指fdr_by(适用于一般或负相关测试的Benjamini/Yekutieli方法)。 默认为'indep'。- is_sortedbool,
optional 如果为 False(默认),p_values 将被排序,但校正后的 pvalues 将保持原始顺序。如果为 True,则假设 pvalues 已经按升序排序。
- Returns:¶
另请参阅
注释
如果有关于真实假设比例的先验信息,那么alpha应该设置为
alpha * m/m_0,其中m是给定的p值的测试数量,m_0是真实假设的估计值。(参见Benjamini, Krieger和Yekuteli)Benjamini、Krieger 和 Yekutiel 的两步法将很快可用,该方法用于估计假假设的数量。
此函数公开的两种方法(Benjamini/Hochberg、Benjamini/Yekutieli)也可以在函数
multipletests中使用,分别为method="fdr_bh"和method="fdr_by"。
Last update:
Oct 16, 2024