关于「拐点上的尖峰:超额质量、多项式反事实与弹性换算」,《门槛聚束与营业额弹性》给出的定量结论是什么?

结论:第一章在一份固定种子的示意分布上估出超额质量 942.0 家、观察弹性 0.1378,结构弹性为 0.25,差距来自摩擦与反事实近似。

数据口径:书中参数为示意,门槛一律记作 T;全部计算由书中程序生成。 第一章在一份固定种子的示意分布上估出超额质量 942.0 家、观察弹性 0.1378,结构弹性为 0.25,差距来自摩擦与反事实近似。

English version

对照数据表

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

order 7 window [T-4, T+4) bin width 1.0
excess mass B (firms)942.0
true bunchers1062
normalised b (bins)3.123
implied dz (units)3.123
observed elasticity e_hat0.1378
structural elasticity0.2500
structural dz*5.737
e_hat if responding share known0.1956
ratio e_hat / structural0.551
查看完整验算程序
# Chapter 1. p12: polynomial counterfactual, excess mass b, elasticity.
# Method of Chetty et al. (2011): fit a degree-p polynomial to bin
# counts outside an excluded window around the kink, read excess
# mass B = sum of (count - fit) inside the window, impose the
# integration constraint by scaling counts above the window by
# (1 + B / S_above) and refitting until B is stable. Normalised
# b = B / (mean fitted count per bin in the window); dz = b * w;
# e = ln(1 + dz / T) / ln((1 - t0) / (1 - t1)). Hand-written least
# squares (normal equations, partial pivoting); data as in p11.
import math
import random

SEED, N = 20261113, 40000
T, T0, T1, E, RESP, NOISE = 100.0, 0.0, 0.2, 0.25, 0.7, 1.0
LO, HI, W, ORDER, XL, XU = 60, 140, 1.0, 7, 4, 4


def draw(rng):
    r = (1 - T1) / (1 - T0)
    zs, nb = [], 0
    for _ in range(N):
        a = rng.lognormvariate(math.log(80.0), 0.5)
        if rng.random() >= RESP or a <= T:
            zs.append(a)
        elif a * r ** E >= T:
            zs.append(a * r ** E)
        else:
            zs.append(T + rng.gauss(0.0, NOISE))
            nb = nb + 1
    return zs, nb


def counts(zs, w):
    c = [0] * int((HI - LO) / w)
    for z in zs:
        k = int(math.floor((z - LO) / w))
        if 0 <= k < len(c):
            c[k] = c[k] + 1
    return c


def solve(a, b):
    n = len(b)
    m = [list(a[i]) + [b[i]] for i in range(n)]
    for c in range(n):
        p = max(range(c, n), key=lambda r: abs(m[r][c]))
        m[c], m[p] = m[p], m[c]
        for r in range(c + 1, n):
            f = m[r][c] / m[c][c]
            m[r] = [m[r][k] - f * m[c][k] for k in range(n + 1)]
    x = [0.0] * n
    for r in range(n - 1, -1, -1):
        s = math.fsum(m[r][k] * x[k] for k in range(r + 1, n))
        x[r] = (m[r][n] - s) / m[r][r]
    return x


def polyfit(xs, ys, order):
    q = order + 1
    a = [[math.fsum(x ** (i + j) for x in xs) for j in range(q)]
         for i in range(q)]
    b = [math.fsum(y * x ** i for x, y in zip(xs, ys)) for i in range(q)]
    return solve(a, b)


def peval(beta, x):
    return math.fsum(c * x ** i for i, c in enumerate(beta))


def bunching(c, w, zs, xl, xu, order, constrain=True):
    mids = [LO + (k + 0.5) * w for k in range(len(c))]
    xs = [(m - zs) / (HI - LO) * 2 for m in mids]
    win = [zs - xl <= m < zs + xu for m in mids]
    above = [m >= zs + xu for m in mids]
    s_above = math.fsum(c[k] for k in range(len(c)) if above[k])
    big_b = 0.0
    for _ in range(500):
        y = [c[k] * (1 + big_b / s_above) if (constrain and above[k])
             else c[k] for k in range(len(c))]
        out = [k for k in range(len(c)) if not win[k]]
        beta = polyfit([xs[k] for k in out], [y[k] for k in out], order)
        fit = [peval(beta, x) for x in xs]
        new_b = math.fsum(c[k] - fit[k] for k in range(len(c)) if win[k])
        if abs(new_b - big_b) < 1e-9:
            break
        big_b = new_b
    h = math.fsum(fit[k] for k in range(len(c)) if win[k]) / (
        (xl + xu) / w)
    return big_b, big_b / h, fit


def elasticity(dz, zs, t0, t1):
    return math.log(1 + dz / zs) / math.log((1 - t0) / (1 - t1))


if __name__ == "__main__":
    zs, nb = draw(random.Random(20261113))
    c = counts(zs, W)
    big_b, b, fit = bunching(c, W, T, XL, XU, ORDER)
    dz = b * W
    e_hat = elasticity(dz, T, T0, T1)
    dz_true = T * (((1 - T0) / (1 - T1)) ** E - 1)
    print("order {}  window [T-{}, T+{})  bin width {}".format(
        ORDER, XL, XU, W))
    print("excess mass B (firms)          {:9.1f}".format(big_b))
    print("true bunchers                  {:9d}".format(nb))
    print("normalised b (bins)            {:9.3f}".format(b))
    print("implied dz (units)             {:9.3f}".format(dz))
    print("observed elasticity e_hat      {:9.4f}".format(e_hat))
    print("structural elasticity          {:9.4f}".format(E))
    print("structural dz*                 {:9.3f}".format(dz_true))
    adj = elasticity(dz / RESP, T, T0, T1)
    print("e_hat if responding share known {:8.4f}".format(adj))
    print("ratio e_hat / structural       {:9.3f}".format(e_hat / E))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《起征点聚束估计与营业额分布、门槛下方堆积揭示的行为弹性母典》第 1 章「拐点上的尖峰:超额质量、多项式反事实与弹性换算」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026319,
  author    = {Fan, Yafu},
  title     = {Bunching at Tax Thresholds and the Distribution of Turnover: Behavioural Elasticities Revealed by Piling-Up below the Line},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论