给定从独立测试生成的 p 值列表,按升序排序,可以使用Benjamini-Hochberg 程序进行多重测试校正。对于每个 p 值,Benjamini-Hochberg 过程允许您计算每个 p 值的错误发现率 (FDR)。也就是说,在 p 值排序列表中的每个“位置”,它会告诉你其中有多少比例可能是对原假设的错误拒绝。
我的问题是,这些 FDR 值是被称为“ q 值”,还是“校正的 p 值”,还是完全称为其他东西?
编辑 2010-07-12:我想更全面地描述我们正在使用的校正程序。首先,我们按照未校正的原始 p 值对测试结果进行升序排序。然后,我们遍历列表,使用 BH 校正计算我一直解释为“如果我们要拒绝此和列表中所有先前测试的零假设的 FDR”,其 alpha 等于观察到的, 相应迭代的未校正 p 值。然后,我们将先前校正的值(迭代 i - 1 处的 FDR)或当前值(在 i 处)的最大值作为我们一直称为“q 值”的值,以保持单调性。
下面是一些代表此过程的 Python 代码:
def calc_benjamini_hochberg_corrections(p_values, num_total_tests):
    """
    Calculates the Benjamini-Hochberg correction for multiple hypothesis
    testing from a list of p-values *sorted in ascending order*.
    See
    http://en.wikipedia.org/wiki/False_discovery_rate#Independent_tests
    for more detail on the theory behind the correction.
    **NOTE:** This is a generator, not a function. It will yield values
    until all calculations have completed.
    :Parameters:
    - `p_values`: a list or iterable of p-values sorted in ascending
      order
    - `num_total_tests`: the total number of tests (p-values)
    """
    prev_bh_value = 0
    for i, p_value in enumerate(p_values):
        bh_value = p_value * num_total_tests / (i + 1)
        # Sometimes this correction can give values greater than 1,
        # so we set those values at 1
        bh_value = min(bh_value, 1)
        # To preserve monotonicity in the values, we take the
        # maximum of the previous value or this one, so that we
        # don't yield a value less than the previous.
        bh_value = max(bh_value, prev_bh_value)
        prev_bh_value = bh_value
        yield bh_value