5D Library › 科学方法论、可证伪性与可重复性危机的数理统计 · English

第四章 发表偏倚、抽屉问题与赢家诅咒

97% 的「成功」

1959 年,统计学家斯特林翻阅了四种心理学期刊一年内的全部研究报告 (Sterling 1959)。在 294 篇使用显著性检验的文章中,286 篇(97.3%)拒绝了零假设,没有一篇重复研究。只要被检验的假说有相当一部分是错的、功效又不接近 100%,这样的「成功率」就只能说明期刊上的结果经过了筛选。六十多年后这个数字几乎没变(第六章:2021 年的抽样为 96%)。

抽屉问题

罗森塔尔在 1979 年把这种筛选称为抽屉问题:期刊里装的是那 5% 的假阳性,抽屉里装的是那 95% 没有发表的不显著结果 (Rosenthal 1979)。他提出了一个后来被广泛使用的指标——失效安全数(fail-safe N):需要多少篇平均效应为零的未发表研究,才能把一组已发表研究的合并结果拉回不显著?如果 kk 项研究的 zz 值之和为 ∑z\sum z,单侧 α=0.05\alpha = 0.05,则

Nfs=(∑z)21.6452−k.N_{fs} = \frac{(\sum z)^2}{1.645^2} – k.

罗森塔尔建议,当 NfsN_{fs} 超过 5k+105k + 10 时,可以认为结果对抽屉问题是「稳健的」。

失效安全数的问题在于它回答的是一个狭窄的问题:抽屉里的研究平均效应为零时,合并结果还显不显著?它不回答效应有多大,也假设抽屉里的研究没有偏向。更常用的方法是看漏斗图:把每项研究的效应量对它的标准误作图。没有发表偏倚时,大样本研究(标准误小)集中在真实效应附近,小样本研究向两边散开,形成一个对称的倒漏斗;如果小样本的不显著研究被留在了抽屉里,漏斗的一侧就会缺一块。埃格等人在 1997 年提出用回归检验这种不对称:把每项研究的 zz 值对它的精度(标准误的倒数)做回归,截距偏离零就说明不对称 (Egger et al. 1997)。这个回归的斜率也可以看作「把效应外推到无限精确的研究」时的估计,后来被称为 PET 估计。

一个带抽屉的模拟文献:300 项研究,真实效应都是 d=0.20d = 0.20,每组 10 到 200 人;显著的正向结果全部发表,其余结果只以 15% 的概率发表。对发表的研究做固定效应元分析、埃格检验、PET 估计与失效安全数。然后各生成 200 个这样的文献,真实效应分别为 0.20 与 0。

推导

# A simulated literature with a file drawer. 300 studies of the same true effect d are run
# with 10 to 200 per group; every significant positive result is published, any other
# result only with probability 0.15. Then: inverse-variance (fixed-effect) meta-analysis
# of what was published, Egger's regression test for funnel asymmetry (Egger et al. 1997),
# the PET estimate, and Rosenthal's (1979) fail-safe N with his tolerance level 5k + 10.
import math, random

def literature(rng, d, k=300, p_other=0.15):
    pub, drawer = [], 0
    for _ in range(k):
        n = rng.randint(10, 200)
        se = math.sqrt(2 / n + d * d / (4 * n))
        est = rng.gauss(d, se)
        if est / se > 1.96 or rng.random() < p_other:
            pub.append((est, se))
        else:
            drawer += 1
    return pub, drawer

def ols(xs, ys):
    n = len(xs); mx, my = sum(xs) / n, sum(ys) / n
    sxx = sum((x - mx) ** 2 for x in xs)
    b = sum((x - mx) * (y - my) for x, y in zip(xs, ys)) / sxx
    a = my - b * mx
    s2 = sum((y - a - b * x) ** 2 for x, y in zip(xs, ys)) / (n - 2)
    # intercept, slope, SE of the intercept
    return a, b, math.sqrt(s2 * (1 / n + mx * mx / sxx))

def analyse(pub):
    w = [1 / se ** 2 for _, se in pub]
    fe = sum(wi * e for wi, (e, _) in zip(w, pub)) / sum(w)
    # Egger: regress z = d / SE on precision 1 / SE. The intercept measures funnel
    # asymmetry; the slope is the PET estimate (the effect extrapolated to an infinitely
    # precise study, SE -> 0)
    a, pet, se_a = ols([1 / se for _, se in pub], [e / se for e, se in pub])
    fsn = sum(e / se for e, se in pub) ** 2 / 1.645 ** 2 - len(pub)
    return fe, a / se_a, pet, fsn

if __name__ == "__main__":
    pub, drawer = literature(random.Random(1979), 0.20)
    fe, t, pet, fsn = analyse(pub)
    sig = sum(e / se > 1.96 for e, se in pub)
    print(f"300 studies, true d = 0.20: {len(pub)} published ({sig} significant),"
          f" {drawer} in the drawer")
    print(f"  fixed-effect d from the published studies = {fe:.3f}; PET d = {pet:.3f}")
    print(f"  Egger intercept t = {t:.1f}; fail-safe N = {fsn:.0f}"
          f" (tolerance 5k + 10 = {5 * len(pub) + 10})")
    print(f"  but the real drawer holds only {drawer} studies,"
          " and their true d is 0.20, not 0")
    print("200 literatures per row:  mean fixed-effect d   mean PET d   Egger t > 2"
          "   fail-safe N > 5k + 10")
    for d in (0.20, 0.0):
        lits = [literature(random.Random(s), d)[0] for s in range(200)]
        res = [analyse(p) + (len(p),) for p in lits]
        fe = sum(r[0] for r in res) / 200
        pet = sum(r[2] for r in res) / 200
        egger = sum(r[1] > 2 for r in res) / 200
        fsn = sum(r[3] > 5 * r[4] + 10 for r in res) / 200
        print(f"  true d = {d:.2f} {'':10s} {fe:17.3f} {pet:12.3f}"
              f" {egger:12.0%} {fsn:16.0%}")
# 300 studies, true d = 0.20: 116 published (90 significant), 184 in the drawer
#   fixed-effect d from the published studies = 0.284; PET d = 0.270
#   Egger intercept t = 0.3; fail-safe N = 23998 (tolerance 5k + 10 = 590)
#   but the real drawer holds only 184 studies, and their true d is 0.20, not 0
# 200 literatures per row:  mean fixed-effect d   mean PET d   Egger t > 2   fail-safe N > 5k + 10
#   true d = 0.20                        0.285        0.190          57%             100%
#   true d = 0.00                        0.038        0.002           6%               5%

这个文献中,300 项研究发表了 116 项(其中 90 项显著),184 项留在抽屉里。固定效应元分析给出 d=0.284d = 0.284,比真实值 0.20 高 42%。这一次的埃格检验没有发现不对称(t=0.3t = 0.3),PET 估计 0.270 也没有纠正多少。失效安全数为 23,998,远高于罗森塔尔的容忍度 590,看起来「非常稳健」;但抽屉里实际只有 184 项研究,而且它们的真实效应是 0.20,不是 0。失效安全数正确地告诉我们效应存在,却对效应被夸大了 42% 一无所知。

重复 200 次之后,图景更清楚。真实效应为 0.20 时,固定效应估计平均为 0.285;PET 估计平均为 0.190,平均而言纠正了偏倚,但单个文献的波动很大;埃格检验只在 57% 的文献中检测到不对称。真实效应为 0 时,发表的文献给出平均 0.038 的虚假效应;埃格检验只在 6% 的文献中报警,与随机报警相差无几。原因是真实效应为零时,300 项研究中只有约 2.5%(七八项)碰巧显著而被选中,发表的研究大多是按 15% 的概率随机发表的不显著结果,漏斗只是轻微不对称;截距又是外推到精度为零处的估计,误差很大,所以检验几乎没有把握度。漏斗图检验的把握度往往很低,它没有报警不能当作没有发表偏倚的证据。

左:低功效的代价。紫色实线为夸大比(显著结果平均效应量与真实效应之比,M 型错误),蓝色虚线为方向错误的概率(S 型错误,右轴);功效 0.20 时夸大约 2.2 倍。右:带抽屉的漏斗图(真实 d = 0.20)。实心点为发表的研究,空心点为抽屉中的研究,虚线为 p = 0.05 的边界,纵轴向下标准误增大。

赢家诅咒:M 型与 S 型错误

即使研究者从不操纵数据,只要期刊只发表显著的结果,发表出来的效应量也会被系统性地高估。原因很简单:在一项功效很低的研究中,只有那些因为抽样误差碰巧估计得很大的样本才能越过显著性的门槛。伊奥尼迪斯把这称为「已发现的真实关联为什么会被夸大」 (Ioannidis 2008)。

格尔曼与卡林在 2014 年建议,在功效之外再计算两个量 (Gelman and Carlin 2014):S 型(符号)错误,即一个显著结果的方向与真实效应相反的概率;M 型(量级)错误,用夸大比表示,即显著结果的平均绝对效应量与真实效应之比。他们用一个实际发表的例子说明:如果某项研究所研究的真实效应只有 2 个百分点、标准误约 8 个百分点,那么它的功效只有 0.06,即使得到显著结果,方向弄反的概率也有 24%,效应量平均被夸大约 9.7 倍。(这里的 0.06 是四舍五入的值,精确值约为 0.057;功效在这么低的范围内,S 型错误与夸大比对功效非常敏感,所以下面程序在功效恰为 0.06 时得到的 20% 与 8.0 倍略小于他们的数字。)他们的经验法则是:功效低于 0.5 时夸大开始变得严重,低于 0.1 时符号错误开始变得严重。

真实效应 d=0.20d = 0.20,两组比较;先找出使功效约为 20% 的每组人数,然后用格尔曼与卡林的公式与 40 万次模拟计算 S 型错误与夸大比。最后一张表对任何真实效应都成立,只取决于真实效应与标准误之比。

推导

# Type M and Type S errors (Gelman & Carlin 2014). SE of d is about sqrt(2 / n); only p <
# .05 is "published". Exaggeration = mean |estimate| if significant / true d; Type S =
# wrong-sign share.
import math, random
from statistics import NormalDist
N = NormalDist()

def retrodesign(D, s, alpha=0.05):
    z = N.inv_cdf(1 - alpha / 2)
    hi, lo = 1 - N.cdf(z - D / s), N.cdf(-z - D / s)
    power = hi + lo
    # E|est| over the significant region, from the truncated-normal means of the two tails
    m_hi = D + s * N.pdf(z - D / s) / hi
    m_lo = D - s * N.pdf(-z - D / s) / lo if lo > 0 else 0.0
    exag = (hi * m_hi - lo * m_lo) / power / D
    return power, lo / power, exag

if __name__ == "__main__":
    d = 0.20
    n = next(n for n in range(2, 1000) if retrodesign(d, math.sqrt(2 / n))[0] >= 0.20)
    s = math.sqrt(2 / n)
    pw, ts, ex = retrodesign(d, s)
    print(f"true d = {d}: {n} per group gives power {pw:.3f} (SE of d = {s:.3f})")
    print(f"  formula: Type S = {ts:.4f}, exaggeration ratio = {ex:.2f},"
          f" mean significant |d| = {ex * d:.2f}")
    rng = random.Random(641); est = [rng.gauss(d, s) for _ in range(400000)]
    sig = [e for e in est if abs(e) / s > 1.96]; pos = [e for e in sig if e > 0]
    mean_sig = sum(map(abs, sig)) / len(sig)
    print(f"  400,000 simulated: mean |d| if significant {mean_sig:.3f};"
          f" wrong sign {1 - len(pos) / len(sig):.4f};"
          f" smallest significant {min(pos):.3f}")
    print("power   exaggeration   Type S"
          "      (holds for any true effect D with standard error SE)")
    for target in (0.06, 0.08, 0.10, 0.20, 0.30, 0.50, 0.80, 0.95):
        lo, hi = 1e-6, 10.0                  # bisection on D / SE
        for _ in range(60):
            mid = (lo + hi) / 2
            lo, hi = (mid, hi) if retrodesign(mid, 1.0)[0] < target else (lo, mid)
        pw, ts, ex = retrodesign(hi, 1.0)
        print(f" {pw:.2f}   {ex:12.2f}   {ts:8.4f}      D / SE = {hi:.2f}")
# true d = 0.2: 63 per group gives power 0.202 (SE of d = 0.178)
#   formula: Type S = 0.0051, exaggeration ratio = 2.24, mean significant |d| = 0.45
#   400,000 simulated: mean |d| if significant 0.448; wrong sign 0.0054; smallest significant 0.349
# power   exaggeration   Type S      (holds for any true effect D with standard error SE)
#  0.06           8.01     0.2013      D / SE = 0.29
#  0.08           4.72     0.0850      D / SE = 0.51
#  0.10           3.71     0.0450      D / SE = 0.65
#  0.20           2.26     0.0053      D / SE = 1.11
#  0.30           1.81     0.0011      D / SE = 1.43
#  0.50           1.41     0.0001      D / SE = 1.96
#  0.80           1.12     0.0000      D / SE = 2.80
#  0.95           1.03     0.0000      D / SE = 3.60

真实效应 d=0.20d = 0.20 时,每组 63 人的功效约为 0.20。在这样的研究中,显著结果报告的效应量平均约为 0.45,夸大比约 2.2;方向弄反的概率约为 0.5%(公式 0.0051,模拟 0.0054)。作者在框架中估计显著结果平均约为 d≈0.65d \approx 0.65、夸大 3 倍以上;按程序的结果,夸大约 2.2 倍,平均约 0.45。还有一个更直观的数字:在这个设计下,任何显著的正向结果都至少是 0.349,即 1.96 个标准误;不可能得到一个显著而又接近真实值 0.20 的估计。

表格显示夸大比随功效下降而迅速增大:功效 0.50 时为 1.41,0.30 时为 1.81,0.20 时为 2.26,0.10 时为 3.71,0.06 时为 8.01;S 型错误在功效 0.10 时为 4.5%,0.06 时为 20%。功效 0.80 时夸大比只有 1.12。所以「先做一个小研究看看,显著了再说」的策略,得到的几乎总是一个被夸大的估计;如果下一项研究按这个估计来计算样本量,它的实际功效就会远低于计划。

证据

神经科学的功效。 巴顿、伊奥尼迪斯等人分析了 2011 年发表的 49 项神经科学元分析(涵盖 730 项研究),估计单项研究的中位功效约为 21% (Button et al. 2013)。他们指出,低功效不仅意味着漏掉真实效应,还意味着显著的发现更可能是假的(第二章的阳性预测值),而且被发现的效应量被夸大(本章的赢家诅咒)。

注

怎样读一项小样本研究。 先问「如果真实效应只有该领域常见的大小(如 d=0.2d = 0.2),这项研究的功效是多少?」再从上表查出夸大比。这不是精确校正,只是提醒:小样本里的显著效应,大概率比真实效应大(第八章核查表第三步)。

假说 · 尚未验证

尚未确立:赢家诅咒能解释重复项目中「效应量减半」的大部分。 如果原研究的功效分布与本章的模型相近,那么即使原研究的效应全部真实存在,重复研究的效应量也应当平均只有原研究的一半到三分之二。如果在只取原研究功效较高(例如大于 0.8)的子集中,重复效应量仍然只有原研究的一半左右,那么赢家诅咒就不是主要原因,这个假说就是错的。

本章小结

期刊主要发表显著结果,这一筛选从 1959 年至今几乎没有变化。失效安全数只回答「效应是否存在」,而且假设抽屉里的研究平均效应为零;在本章的模拟中,它显示「极其稳健」,而发表文献把效应夸大了 42%。漏斗图的埃格检验把握度有限,没有报警不等于没有偏倚。在低功效研究中,显著结果的效应量被系统性夸大:真实 d=0.20d = 0.20、功效 20% 时,显著结果平均约为 0.45(夸大约 2.2 倍),方向弄反的概率约 0.5%。下一章看大规模重复检验的实际结果。

参考文献

Button, Katherine S., John P. A. Ioannidis, Claire Mokrysz, et al. 2013. “Power Failure: Why Small Sample Size Undermines the Reliability of Neuroscience.” Nature Reviews Neuroscience 14 (5): 365–76. https://doi.org/10.1038/nrn3475.
Egger, Matthias, George Davey Smith, Martin Schneider, and Christoph Minder. 1997. “Bias in Meta-Analysis Detected by a Simple, Graphical Test.” BMJ 315 (7109): 629–34. https://doi.org/10.1136/bmj.315.7109.629.
Gelman, Andrew, and John Carlin. 2014. “Beyond Power Calculations: Assessing Type s (Sign) and Type m (Magnitude) Errors.” Perspectives on Psychological Science 9 (6): 641–51. https://doi.org/10.1177/1745691614551642.
Ioannidis, John P. A. 2008. “Why Most Discovered True Associations Are Inflated.” Epidemiology 19 (5): 640–48.
Rosenthal, Robert. 1979. “The File Drawer Problem and Tolerance for Null Results.” Psychological Bulletin 86 (3): 638–41.
Sterling, Theodore D. 1959. “Publication Decisions and Their Possible Effects on Inferences Drawn from Tests of Significance—or Vice Versa.” Journal of the American Statistical Association 54 (285): 30–34.

Fan, Y. (2026). Scientific Methodology, Falsifiability and the Mathematical Statistics of the Replication Crisis: From Popper's Demarcation and p-Hacking to Ioannidis's Theorem and Pre-Registration, Read Beside Classical Chinese Evidential Scholarship [科学方法论、可证伪性与可重复性危机的数理统计] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23782104 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).