Math for Causal Inference

Day 78. Regression Kink & RD Extensions

Some policies change the slope of a schedule rather than its level, such as a benefit capped at a maximum. The regression kink design divides the change in the outcome's slope by the change in the policy's slope. Also: geographic boundaries, multiple cutoffs and RD in time.

Video coming soon
Learning outcomes
  • ●Define the regression kink estimand and the smoothness assumptions it requires.
  • ●Estimate slope changes with local polynomials and explain why they are noisier than jumps.
  • ●Extend RD to multiple cutoffs, geographic boundaries and time, and list each extension's threats.
  • ●Apply RKD to unemployment benefits and other capped or tiered schedules.
2-HOUR SESSION PLAN
Theory 25′Warm-up (1–5) 20′Proofs (6–10) 35′Applied (11–15) 25′Python & Lab 15′
Colab notebook (.ipynb) Jump to the simulator

Theory

Kinked policies

A policy variable B=b(X)B = b(X) is a continuous function of the running variable with a kink at cc: its slope changes from b′(c−)b'(c^-) to b′(c+)b'(c^+). Examples: unemployment benefits equal to 50% of past earnings up to a maximum; tax credits that phase in and out; co-payment schedules.

The RKD estimand

If Y=g(B,X,ε)Y = g(B, X, \varepsilon), then

τRKD=lim⁡x↓cddxE[Y∣X=x]−lim⁡x↑cddxE[Y∣X=x]b′(c+)−b′(c−)\tau_{RKD} = \frac{\lim_{x \downarrow c}\frac{d}{dx}E[Y \mid X = x] - \lim_{x \uparrow c}\frac{d}{dx}E[Y \mid X = x]}{b'(c^+) - b'(c^-)}

identifies the (average) marginal effect of BB on YY at cc, under smoothness: the density of XX and the direct dependence of YY on XX have continuous derivatives at cc (Card, Lee, Pei and Weber, 2015). With imperfect implementation (actual benefits deviate from the formula), a fuzzy RKD divides by the estimated kink in actual BB.

Estimation

Fit local polynomials on each side and compare the slopes at cc (local linear or local quadratic, with a kink term (X−c)1[X≥c](X - c)\mathbf 1[X \ge c]). Derivatives are harder to estimate than levels: the variance of a slope estimate scales like 1/(nh3)1/(nh^3) instead of 1/(nh)1/(nh), so RKD needs large samples (administrative data).

Extensions of RD

  • Multiple cutoffs: different cohorts or regions have different thresholds; normalise X−cjX - c_j and pool (a weighted average of cutoff-specific effects), or exploit the variation to learn how effects change with the cutoff.
  • Geographic RD: a boundary separates treated from untreated areas (school districts, states with different laws). The running variable is distance to the boundary (two-dimensional). Threats: other policies change at the same border; people sort across borders.
  • RD in time: treatment starts on a date. Concerns: other things change at the same time, anticipation and adjustment, serial correlation; often closer to an interrupted time series than an RD.
  • Extrapolation: with assumptions (for example, conditional independence of XX and outcomes given covariates), effects away from the cutoff can be estimated.

Part 1 · Warm-up

Exercise 1 · The policy kink

Weekly UI benefits are 50% of previous weekly earnings up to a maximum of $500, reached at earnings of $1,000. What is the slope change of the schedule at $1,000?

Show solution

Step 1. Left slope: 0.5. Right slope: 0 (benefit capped).

Step 2. Change: 0−0.5=−0.50 - 0.5 = -0.5.

Exercise 2 · An RKD estimate

Unemployment duration rises with earnings at 0.2 weeks per $100 of earnings below the kink and 0.1 weeks per $100 above. Estimate the effect of $100 more in weekly benefit on duration.

Show solution

Step 1. Slope change of duration: 0.1−0.2=−0.10.1 - 0.2 = -0.1 weeks per $100 of earnings.

Step 2. Slope change of benefits: −0.5-0.5 dollars per dollar, i.e. −50-50 dollars of benefit per $100 of earnings.

Step 3. τ^=−0.1/(−50)=0.002\hat\tau = -0.1/(-50) = 0.002 weeks per dollar of weekly benefit, i.e. 0.2 weeks per $100 of benefit.

Answer: $100 more in weekly benefits lengthens unemployment by about 0.2 weeks.

Exercise 3 · Why noisier?

Why are RKD estimates usually less precise than RD estimates from the same sample?

Show solution

Step 1. RD estimates a level; RKD estimates a derivative, which needs the spread of XX within the window to be large.

Answer: slope variance scales like 1/(nh3)1/(nh^3); with the small bandwidths needed near the kink, it is large.

Exercise 4 · Normalising cutoffs

Three states award a scholarship at test scores of 60, 65 and 70. How can the cutoffs be pooled?

Show solution

Step 1. Define X~=X−cj\tilde X = X - c_j for a student in state jj; all cutoffs are at X~=0\tilde X = 0.

Step 2. Estimate one RD on X~\tilde X, or separate RDs per state and average.

Answer: the pooled estimate is a weighted average of state-specific effects, weighted by the density of students near each cutoff.

Exercise 5 · A school-district boundary

Houses on either side of a school-district boundary sell at different prices. Name two reasons the price gap may not reflect school quality.

Show solution

Step 1. Other services or taxes change at the same boundary (property taxes, policing).

Step 2. The boundary may follow a road, river or neighbourhood divide that itself affects prices; sorting of households changes neighbourhood composition.

Part 2 · Proofs

Exercise 6 · RKD identification

Let Y=βB+m(X)+εY = \beta B + m(X) + \varepsilon with E[ε∣X]E[\varepsilon \mid X] having a continuous derivative, mm differentiable, and B=b(X)B = b(X) kinked at cc. Prove τRKD=β\tau_{RKD} = \beta.

Show solution

Step 1. E[Y∣X=x]=βb(x)+m(x)+E[ε∣X=x]E[Y \mid X = x] = \beta b(x) + m(x) + E[\varepsilon \mid X = x].

Step 2. Derivative: βb′(x)+m′(x)+ddxE[ε∣X=x]\beta b'(x) + m'(x) + \frac{d}{dx}E[\varepsilon \mid X = x].

Step 3. The last two terms are continuous at cc; the slope change is β(b′(c+)−b′(c−))\beta(b'(c^+) - b'(c^-)).

Step 4. Divide by the policy's slope change. ■\blacksquare

Exercise 7 · Fuzzy RKD

If actual benefits BB deviate from b(X)b(X) by noise unrelated to YY, show τ\tau equals the outcome slope change divided by the slope change of E[B∣X]E[B \mid X].

Show solution

Step 1. E[Y∣X]=βE[B∣X]+m(X)+E[ε∣X]E[Y \mid X] = \beta E[B \mid X] + m(X) + E[\varepsilon \mid X].

Step 2. Differentiate and take the change at cc: ΔslopeY=β ΔslopeE[B∣X]\Delta\text{slope}_Y = \beta\,\Delta\text{slope}_{E[B \mid X]}.

Step 3. Divide. ■\blacksquare

Exercise 8 · Variance of a slope estimate

With X−cX - c uniform on [0,h][0, h], nh≈nf(c)hn_h \approx nf(c)h observations and error variance σ2\sigma^2, show that the variance of the OLS slope in a local linear fit is of order σ2/(nf(c)h3)\sigma^2/(nf(c)h^3).

Show solution

Step 1. OLS slope variance: σ2/(nhVar⁡(X))\sigma^2/(n_h\operatorname{Var}(X)).

Step 2. Var⁡(X)=h2/12\operatorname{Var}(X) = h^2/12 for a uniform on [0,h][0, h].

Step 3. σ2/(nf(c)h⋅h2/12)=12σ2/(nf(c)h3)\sigma^2/(nf(c)h \cdot h^2/12) = 12\sigma^2/(nf(c)h^3). ■\blacksquare

Exercise 9 · Pooling cutoffs

With cutoff-specific effects τj\tau_j and njn_j observations near each cutoff, show that a pooled sharp RD on the normalised running variable estimates approximately ∑jwjτj\sum_j w_j\tau_j with wj∝njw_j \propto n_j (when the regression functions have the same slopes).

Show solution

Step 1. Near X~=0\tilde X = 0, the pooled right limit is the njn_j-weighted average of the right limits, and likewise the left.

Step 2. Subtract: the pooled jump is ∑j(nj/∑knk)τj\sum_j(n_j/\sum_k n_k)\tau_j. ■\blacksquare If slopes differ by cutoff, cutoff-specific fits are needed.

Exercise 10 · A coinciding kink

Suppose the tax schedule also has a kink at the same earnings level, so that m(X)m(X) has a slope change κ\kappa at cc. Show the RKD estimate becomes β+κ/Δb′\beta + \kappa/\Delta b'.

Show solution

Step 1. The outcome slope change becomes βΔb′+κ\beta\Delta b' + \kappa.

Step 2. Divide by Δb′\Delta b'. ■\blacksquare Any other policy kinked at the same point is a confounder for RKD, as a coinciding jump is for RD.

Part 3 · Applied

Exercise 11 · UI benefits and unemployment duration

Using administrative records on 100,000 claimants, an RKD estimate implies that $100 more in weekly benefits lengthens unemployment by 0.2 weeks (Exercise 2). At a typical benefit of $450 and duration of 18 weeks, compute the elasticity of duration with respect to benefits.

Show solution

Step 1. A 1% rise in benefits is $4.50, lengthening duration by 0.2×4.5/100=0.0090.2 \times 4.5/100 = 0.009 weeks.

Step 2. As a share of 18 weeks: 0.009/18=0.05%0.009/18 = 0.05\%.

Step 3. Elasticity: ε=(ΔD/D)/(ΔB/B)=(0.009/18)/0.01=0.05\varepsilon = (\Delta D/D)/(\Delta B/B) = (0.009/18)/0.01 = 0.05.

Answer: about 0.05, a small elasticity: at this margin, benefits barely lengthen unemployment.

Exercise 12 · School quality and house prices

Across attendance-zone boundaries, houses on the side with schools scoring 5% higher on tests sell for 2.5% more, with houses within 0.2 miles of the boundary and boundary fixed effects. Interpret and give one robustness check.

Show solution

Step 1. Elasticity of house prices to school test scores ≈ 2.5/5=0.52.5/5 = 0.5.

Step 2. Check: house and neighbourhood characteristics (size, age, demographics) should be balanced across the boundary; prices just outside the boundary in placebo directions should not jump.

Answer: parents value school quality capitalised at about half the percentage test-score gap.

Exercise 13 · Pooling state scholarship cutoffs

Three states' scholarship RDs give effects on enrolment of 0.10, 0.06 and 0.04 with 2,000, 1,000 and 1,000 students near the cutoffs. Compute the pooled effect.

Show solution

Step 1. Weights 0.5, 0.25, 0.25.

Step 2. 0.5(0.10)+0.25(0.06)+0.25(0.04)=0.05+0.015+0.01=0.0750.5(0.10) + 0.25(0.06) + 0.25(0.04) = 0.05 + 0.015 + 0.01 = 0.075.

Answer: 7.5 points; the spread across states suggests effects depend on the cutoff level or state context.

Exercise 14 · RD in time: driving restrictions

A city bans cars with certain plate numbers from driving on given weekdays starting on 1 March. Hourly pollution readings around that date are used to estimate the effect. List three concerns.

Show solution

Step 1. Other changes at the same date (season, weather, other regulations).

Step 2. Adaptation: drivers buy second cars or shift trips over weeks, so short-run and long-run effects differ.

Step 3. Serial correlation in hourly pollution makes conventional standard errors far too small.

Answer: treat it as an interrupted time series: control for weather and season, check placebo dates, use autocorrelation-robust inference, and look at longer windows.

Exercise 15 · An RKD in a simulation

In the simulation below, a benefit schedule with slope 0.5 is capped at X=0X = 0; the true effect of benefits on the outcome is 0.8. Compare RKD estimates with local linear and local quadratic fits.

Show solution

Step 1. Local linear: mean about 0.43, badly biased, because the curvature of m(X)m(X) within the bandwidth contaminates the slopes.

Step 2. Local quadratic: mean about 0.82, close to the truth, but with an SD near 1.2, four times larger.

Answer: RKD is feasible but fragile: slopes need flexible fits, and flexible fits need very large samples.

Verify in Python

import numpy as np

print("Ex 2:", -.1 / -50, "weeks per $ ->", -.1 / -50 * 100, "weeks per $100", " Ex 11 elasticity:", round((.2 * 4.5 / 100 / 18) / .01, 3),
      " Ex 13:", .5 * .10 + .25 * .06 + .25 * .04)

rng = np.random.default_rng(78)
def kink_slope(x, y, h, p):
    out = []
    for side in (x >= 0, x < 0):
        xx, yy = x[side], y[side]; w = np.clip(1 - np.abs(xx) / h, 0, None); m = w > 0
        X = np.column_stack([xx[m] ** k for k in range(p + 1)]); W = w[m]
        out.append(np.linalg.solve(X.T @ (W[:, None] * X), X.T @ (W * yy[m]))[1])
    return out[0] - out[1]
res = {1: [], 2: []}
for _ in range(300):
    x = rng.uniform(-1, 1, 50_000)
    B = .5 * np.minimum(x, 0) + 2                     # benefit: slope 0.5 below the cap, 0 above
    y = .8 * B + np.sin(1.5 * x) + .3 * x ** 2 + rng.normal(0, 1, x.size)
    for p in (1, 2):
        res[p].append(kink_slope(x, y, .4, p) / (0 - .5))
for p in (1, 2):
    print(f"local {'linear' if p == 1 else 'quadratic'}: mean {np.mean(res[p]):.3f}  sd {np.std(res[p]):.3f}  (truth 0.8)")

Key takeaways

  • RKD uses a change in a policy's slope: effect = (change in outcome slope) / (change in policy slope), under smoothness of everything else.
  • Slopes are harder to estimate than levels (variance ∝ 1/(nh³)); RKD needs large data sets.
  • Multiple cutoffs, geographic boundaries and RD in time extend the design, each with its own threats: coinciding policies, sorting, adaptation and serial correlation.

Simulation Lab: Regression Kink Design

Open full screen →

A capped benefit schedule: dividing the outcome's slope change by the schedule's slope change.

1.41.61.822.2-1-0.500.51earnings (centred at the cap)benefit123-1-0.500.51earnings (centred at the cap)outcome (binned means)
outcome slope change
-0.614
RKD estimate of β
1.23
truth 0.80

Unemployment benefits replace 50% of past earnings up to a cap (the kink at 0, left panel). The outcome's slope changes at the kink by β × (−0.5); dividing the slope change by the schedule's slope change estimates β. Slopes are estimated with local polynomials on each side; curvature in the outcome biases local linear slopes, and local quadratic fits are much noisier.

Day 77Day 79