关于「反事实的三个零件:多项式阶数、积分约束与分格宽度」,《门槛聚束与营业额弹性》给出的定量结论是什么?

结论:结果非常稳定。以格数计的 b 随格宽成反比变化,从 6.228 到 0.785,但换算成以单位计的距离之后,四种格宽给出的 dz 在 3.114 与 3.138 之间,弹性在 0.1374 与 0.1385 之间。超额质量本身也几乎不动,在 940.0 与 945.3 之间。

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

English version

对照数据表

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

widthbinsexcess Bb (bins)dz (units)e_hat
0.5160940.06.2283.1140.1374
1.080942.03.1233.1230.1378
2.040940.61.5583.1170.1375
4.020945.30.7853.1380.1385
查看完整验算程序
# Chapter 3. p33: bin width. The same firms of p11 are binned at
# widths 0.5, 1, 2 and 4 units; the window stays [T - 4, T + 4) in
# units and the degree stays 7. b is reported in bins and in units
# (dz = b * w); the elasticity uses dz. A good estimator should give
# nearly the same dz whatever the width; the excess mass in firms
# should not depend on it either. Illustrative parameters.
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 = 60, 140


def draw(rng, n=N, resp=RESP):
    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(round((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 bunching(c, w, zs, xl, xu, order, constrain=True, skip=None):
    """Excess mass B, normalised b (bins) and fitted counterfactual."""
    k_all = range(len(c))
    mids = [LO + (k + 0.5) * w for k in k_all]
    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]
    out = [k for k in k_all if not win[k] and not (skip and skip[k])]
    q = order + 1
    pw = [[xs[k] ** i for i in range(2 * q)] for k in k_all]
    a = [[math.fsum(pw[k][i + j] for k in out) for j in range(q)]
         for i in range(q)]
    s_above = math.fsum(c[k] for k in k_all if above[k])
    big_b, fit = 0.0, []
    for _ in range(200):
        g = 1 + big_b / s_above if constrain else 1.0
        y = [c[k] * g if above[k] else c[k] for k in k_all]
        rhs = [math.fsum(y[k] * pw[k][i] for k in out) for i in range(q)]
        beta = solve(a, rhs)
        fit = [math.fsum(beta[i] * pw[k][i] for i in range(q))
               for k in k_all]
        new_b = math.fsum(c[k] - fit[k] for k in k_all if win[k])
        done = abs(new_b - big_b) < 1e-7
        big_b = new_b
        if done:
            break
    h = math.fsum(fit[k] for k in k_all 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))
    print("width  bins  excess B  b (bins)  dz (units)  e_hat")
    for w in (0.5, 1.0, 2.0, 4.0):
        c = counts(zs, w)
        big_b, b, _ = bunching(c, w, T, 4, 4, 7)
        print("{:5.1f} {:5d} {:9.1f} {:9.3f} {:11.3f} {:7.4f}".format(
            w, len(c), big_b, b, b * w, elasticity(b * w, T, T0, T1)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《起征点聚束估计与营业额分布、门槛下方堆积揭示的行为弹性母典》第 3 章「反事实的三个零件:多项式阶数、积分约束与分格宽度」(版本 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}
}

本书其他章节结论