关于「局部线性回归:三角核加权最小二乘、边界偏差与只在门槛处成立的效应」,《会员门槛的断点回归》给出的定量结论是什么?

结论:在 60 这条线上,断点估计是 2.764,线上真值是 2.5769。可是全部 VIP 的平均权益是 3.063,全部客人(假如人人都有权益)的平均权益是 2.001,三者都不相同。如果把线挪到 70,线上客人的平均黏性更高,真值变成 3.1538,那份样本上的断点估计是 2.904。与此同时,能达到线的客人比例从 0.2488 降到 0.0823。

数据口径:落笔前本书核对原文并作蓝图修正:1960 年的论文研究的是奖学金荣誉证书而非会员体系,2008 年的指南是方法论文,二者都没有给出任何会员权益的效应量,书中的高估倍数全部来自固定种子的示意数据;命题也必须带边界陈述:只识别门槛处的局部效应,客人能精确凑单时设计失效,估计对带宽敏感,不宜用全局高阶多项式。 书中参数为示意;全部计算由书中程序生成。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0823, 0.2488, 2.001, 2.5769, 2.764, 2.904

quantityvalue
RD estimate at line 602.764
true benefit at x = 602.5769
true benefit, average over VIPs3.063
true benefit, average over everyone2.001
true benefit at x = 703.1538
RD estimate if the line were at 702.904
VIP share with line at 60 / at 700.2488 / 0.0823
查看完整验算程序
# Chapter 2. p23: what a sharp RD identifies, and what it does not.
# Benefit is heterogeneous: tau(u) = 2 + u, so the average benefit of
# customers with spend x is 2 + (12 / 208) (x - 50). The RD jump at the
# line estimates only E[tau | x = c]. We compare it with the average
# benefit over all VIPs, over all customers, and with the jump that a
# line moved to 70 would show (fresh sample, seed 20261123). Data as in
# p11 (seed 20261113); triangular kernel, h = 8. Illustrative.
import math
import random

H = 8.0


def draw(rng, n, c, sel=1.0):
    rows = []
    for _ in range(n):
        u = rng.gauss(0.0, 1.0)
        x = 50.0 + 12.0 * u + 8.0 * rng.gauss(0.0, 1.0)
        d = 1 if x >= c else 0
        g = 0.15 * (x - c) + 0.0003 * (x - c) ** 3
        y = 20.0 + 6.0 * sel * u + g + (2.0 + u) * d
        rows.append((x, y + rng.gauss(0.0, 3.0), u))
    return rows


def intercept(pts, c, h):
    xs, ys, ws = [], [], []
    for x, y in pts:
        t = abs(x - c) / h
        if t < 1.0:
            xs.append(x - c)
            ys.append(y)
            ws.append(1.0 - t)
    s0 = math.fsum(ws)
    s1 = math.fsum(w * x for w, x in zip(ws, xs))
    s2 = math.fsum(w * x * x for w, x in zip(ws, xs))
    t0 = math.fsum(w * y for w, y in zip(ws, ys))
    t1 = math.fsum(w * x * y for w, x, y in zip(ws, xs, ys))
    return (s2 * t0 - s1 * t1) / (s0 * s2 - s1 * s1)


def rd(rows, c, h):
    left = [(r[0], r[1]) for r in rows if r[0] < c]
    right = [(r[0], r[1]) for r in rows if r[0] >= c]
    return intercept(right, c, h) - intercept(left, c, h)


def mean(v):
    return math.fsum(v) / len(v)


if __name__ == "__main__":
    rows = draw(random.Random(20261113), 20000, 60.0)
    rows70 = draw(random.Random(20261123), 20000, 70.0)
    print("quantity                               value")
    print("RD estimate at line 60                {:7.3f}".format(
        rd(rows, 60.0, H)))
    print("true benefit at x = 60                {:7.4f}".format(
        2.0 + 12.0 / 208.0 * 10.0))
    print("true benefit, average over VIPs       {:7.3f}".format(
        mean([2.0 + r[2] for r in rows if r[0] >= 60.0])))
    print("true benefit, average over everyone   {:7.3f}".format(
        mean([2.0 + r[2] for r in rows])))
    print("true benefit at x = 70                {:7.4f}".format(
        2.0 + 12.0 / 208.0 * 20.0))
    print("RD estimate if the line were at 70    {:7.3f}".format(
        rd(rows70, 70.0, H)))
    print("VIP share with line at 60 / at 70   {:.4f} / {:.4f}".format(
        mean([1.0 if r[0] >= 60.0 else 0.0 for r in rows]),
        mean([1.0 if r[0] >= 70.0 else 0.0 for r in rows70])))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《断点回归设计与会员等级门槛、消费满额升级线两侧的局部因果识别母典》第 2 章「局部线性回归:三角核加权最小二乘、边界偏差与只在门槛处成立的效应」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-303 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026303,
  author    = {Fan, Yafu},
  title     = {Regression-Discontinuity Designs at Membership-Tier Thresholds: Local Causal Identification on Either Side of a Spend-Based Upgrade Line},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论