What does Regression Discontinuity at Membership Tiers conclude, in numbers, about “Topping Up to Upgrade: How Precisely Manipulable Spending Breaks the Design”?
Answer: Chapter 5 shows the bias reaching 1.709 as top-ups grow and examines imprecise control and the donut.
Scope of the numbers: Parameters are illustrative; all calculations are generated by the book's programs. This is general analysis, not individualised business advice, and the book neither recommends nor supplies misleading threshold copy designed to provoke top-ups.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1.709
| P | RD est | bias | density z | jump in v | z(v) |
|---|---|---|---|---|---|
| 0.00 | 2.555 | -0.022 | -1.38 | 0.080 | 0.82 |
| 0.10 | 2.508 | -0.069 | 8.98 | 0.010 | 0.10 |
| 0.20 | 3.044 | 0.467 | 17.20 | 0.236 | 2.40 |
| 0.30 | 3.675 | 1.098 | 24.20 | 0.372 | 3.81 |
| 0.45 | 4.286 | 1.709 | 28.44 | 0.774 | 7.12 |
| true local effect 2.5769 |
Show the full program
# Chapter 5. p51: top-up orders (customers padding a basket to reach
# the VIP line) and how they break the design. Top-up model of p41:
# within 4 units below c = 60 a customer tops up with probability
# min(1, 2 P / (1 + exp(-2 u))) and lands in [c, c + 1.5). Prior-year
# visits v = 6 + 2 u + noise are predetermined. For each P (seed
# 20261151 for every P, 20000 customers, h = 8): the RD estimate and
# its bias, the density test z, and the jump in v with its z. True
# local effect 2.5769. Illustrative parameters.
import math
import random
C, N, BIN, H = 60.0, 20000, 0.5, 8.0
LOCAL = 2.0 + 12.0 / 208.0 * (C - 50.0)
def draw(rng, n, topup=0.0, land=1.5, c=C):
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)
v = 6.0 + 2.0 * u + rng.gauss(0.0, 1.5)
q = min(1.0, 2.0 * topup / (1.0 + math.exp(-2.0 * u)))
r = rng.random()
if c - 4.0 <= x < c and r < q:
x = c + rng.uniform(0.0, land)
d = 1 if x >= c else 0
g = 0.15 * (x - c) + 0.0003 * (x - c) ** 3
y = 20.0 + 6.0 * u + g + (2.0 + u) * d + rng.gauss(0.0, 3.0)
rows.append((x, y, u, v))
return rows
def wls(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))
det = s0 * s2 - s1 * s1
a = (s2 * t0 - s1 * t1) / det
b = (s0 * t1 - s1 * t0) / det
va = math.fsum((w * (s2 - s1 * x) / det * (y - a - b * x)) ** 2
for w, x, y in zip(ws, xs, ys))
return a, va
def jump(rows, col, c, h):
al, vl = wls([(r[0], r[col]) for r in rows if r[0] < c], c, h)
ar, vr = wls([(r[0], r[col]) for r in rows if r[0] >= c], c, h)
return ar - al, math.sqrt(vl + vr)
def density_z(xs, c, b, h):
n = len(xs)
k = int(math.ceil(3 * h / b))
cnt = {j: 0 for j in range(-k, k)}
for x in xs:
j = int(math.floor((x - c) / b))
if -k <= j < k:
cnt[j] = cnt[j] + 1
left = [(c + (j + 0.5) * b, cnt[j] / (n * b)) for j in range(-k, 0)]
right = [(c + (j + 0.5) * b, cnt[j] / (n * b)) for j in range(0, k)]
fm, fp = wls(left, c, h)[0], wls(right, c, h)[0]
se = math.sqrt(24.0 / 5.0 / (n * h) * (1.0 / fp + 1.0 / fm))
return (math.log(fp) - math.log(fm)) / se
if __name__ == "__main__":
print(" P RD est bias density z jump in v z(v)")
for p in (0.0, 0.1, 0.2, 0.3, 0.45):
rows = draw(random.Random(20261151), N, topup=p)
est, _ = jump(rows, 1, C, H)
jv, sv = jump(rows, 3, C, H)
dz = density_z([r[0] for r in rows], C, BIN, H)
print("{:4.2f} {:7.3f} {:6.3f} {:9.2f} {:10.3f} {:6.2f}".format(
p, est, est - LOCAL, dz, jv, jv / sv))
print("true local effect {:.4f}".format(LOCAL))Single source and citation
Fan, Y. (2026). Regression-Discontinuity Designs at Membership-Tier Thresholds: Local Causal Identification on Either Side of a Spend-Based Upgrade Line (Version 1.0.0), Chapter 5: Topping Up to Upgrade: How Precisely Manipulable Spending Breaks the Design. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 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}
}Other chapter answers in this book
- Chapter 1 · Either Side of the VIP Line: Selection Bias, the Naive Gap and a Local Comparison at the Threshold
- Chapter 2 · Local Linear Regression: Triangular-Kernel Weighted Least Squares, Boundary Bias and an Effect That Holds Only at the Threshold
- Chapter 3 · Choosing the Bandwidth: Trading Bias for Variance, a Monte Carlo Optimum and Boundary Cross-Validation
- Chapter 4 · The McCrary Density Test: Local Lines on Either Side of a Histogram, Power and Blind Spots
- Chapter 6 · Three Robustness Checks: High-Order Polynomials, Placebo Thresholds and the Fuzzy Design
- Chapter 7 · Sources East and West: Rank for Count in the Book of Lord Shang and the Scholarship Discontinuity of 1960
- Chapter 8 · Closing the Loop: Evaluating a Membership-Tier Threshold, the Distilled Tool and a Pre-Registered Plan