Toolbox

rdrobust for Regression Kink Design: Estimating Slope Discontinuities with deriv=1

1 What Problem Does This Tool Solve?

Most regression discontinuity (RD) designs exploit a jump in the level of treatment at a cutoff the standard sharp RD. But many real-world policies create a kink: not a jump in treatment, but a change in the slope of the relationship between a running variable and a benefit schedule.

This is the Regression Kink Design (RKD), formalised by Card et al. [2015]. The classic application is unemployment insurance (UI): UI benefits typically replace a fixed fraction of previous earnings up to a cap. At the cap, the slope of the benefit function changes from positive (below cap: higher earnings → higher benefits) to zero (above cap: additional earnings do not increase benefits). A researcher can exploit this kink in the benefit schedule as a natural experiment to identify the causal effect of UI generosity on unemployment duration.

The rdrobust package in R which most practitioners know for standard RD estimation supports RKD analysis through the deriv=1 option. This article walks through RKD theory, the deriv=1 implementation, and key practical considerations.

2 RKD Theory: The Estimand

In the sharp RKD, the running variable Xi determines treatment Di via a known, kinked assignment function b(·):

Di = b(Xi) + noise,    b'(x) =
{
b    if x < c
b+    if x ≥ c
, (1)

with b- ≠ b+ (the kink) and b(c) continuous (no jump). The sharp RKD estimand is:

τRKD =
limx↓c
𝔼[Yi | Xi = x]' −
limx↑c
𝔼[Yi | Xi = x]'
b+ − b
, (2)

where primes denote derivatives with respect to x. In words: τRKD is the ratio of the jump in the slope of the outcome regression function at the cutoff to the jump in the slope of the treatment function at the cutoff.

Under the identifying assumption that E[Yi(d)|Xi=x] is continuously differentiable in x at c for each d the analogue of continuity in the standard RD and that the running variable density is differentiable at c, τRKD identifies the weighted average derivative of the treatment effect [Card et al., 2015].

3 Installation and Setup

Listing 1: Install and load rdrobust

install.packages("rdrobust") # Install from CRAN library(rdrobust)

The key option for RKD is deriv=1, which tells rdrobust to estimate a derivative discontinuity (slope change) rather than a level discontinuity (jump) at the cutoff.

4 Minimal Working Example: UI Benefits

We simulate data mimicking an unemployment insurance kink design:

Listing 2: Simulated RKD: UI benefit kink

library(rdrobust) set.seed(123) n <- 3000 # Previous earnings (running variable, centred at cap c=0) x <- runif(n, -1, 1) # Treatment (UI benefit): flat at cap for x>0 (slope change) b_slope_below <- 0.5 # 50-cent benefit per dollar of earnings b_slope_above <- 0.0 # 0 cents above cap benefit <- ifelse(x<0, 0.5 * x, 0) + rnorm(n, sd=0.05) # Outcome unemployment duration (in weeks) # True treatment effect (ATE-type): 2 extra weeks per dollar of weekly benefit tau_true <- 2.0 Y <- tau_true * benefit - 0.3 * x + rnorm(n, sd=1) # Sharp RKD: deriv=1 estimates slope discontinuity in Y at x=0 # Divided by slope change in treatment (b_plus - b_minus = 0 - 0.5 = -0.5) rk_out <- rdrobust(y=Y, x=x, deriv=1) summary(rk_out)

The summary(rk_out) output reports:

  • Conventional: the local polynomial slope-discontinuity estimate using the MSE-optimal bandwidth.
  • Bias-corrected: removes the leading bias term using higher-order polynomial estimation.
  • Robust: bias-corrected estimate with robust confidence intervals that account for bias uncertainty [Calonico et al., 2014].

The reduced-form estimate from rdrobust is the numerator of the RKD estimand the slope discontinuity in Y. To recover the causal effect τRKD, divide by the known slope change b+ - b- = -0.5:

Listing 3: Recovering the RKD treatment effect

slope_change <- -0.5 # known from policy schedule reduced_form_slope <- rk_out$coef["Conventional"] tau_rkd <- reduced_form_slope / slope_change cat("RKD estimate:", tau_rkd, "\n") cat("Robust 95% CI:", rk_out$ci["Robust",] / slope_change, "\n")

5 Visualising the Kink

Listing 4: rdplot for RKD: visualise slope change

rdplot(y=Y, x=x, c=0, title = "Outcome vs Running Variable: UI Kink Design", x.label = "Earnings relative to benefit cap", y.label = "Unemployment duration (weeks)")

Figure 1: In the RKD, the treatment function has a kink at x=0 (benefit slope changes). If benefits causally affect unemployment duration, the outcome function E[Y|X=x] also has a kink. The slope discontinuity in Y divided by the slope change in D identifies the causal effect.

6 Key Options and Pitfalls

6.1 Bandwidth

The rdrobust default bandwidth selector (MSE-optimal for level estimation) may be sub-optimal for slope estimation. The derivative-optimal bandwidth is generally wider than the level-optimal bandwidth because slope estimation requires more data. Use bwselect="mserd" (MSE-optimal for the chosen derivative, already the default when deriv=1 is set) or bwselect="cerrd" for CER-optimal bandwidth.

6.2 Polynomial Order

For standard RD, local linear regression (order 1) is recommended. For RKD, Card et al. [2015] recommend local quadratic regression (order 2), because identifying the slope discontinuity requires estimating the second derivative of the conditional expectation function a quadratic fit provides this naturally. Set p=2 in rdrobust.

Listing 5: Recommended RKD specification

rk_quad <- rdrobust(y=Y, x=x, deriv=1, p=2, q=3) # p=2: local quadratic (recommended for RKD) # q=3: cubic for bias correction (one order higher) summary(rk_quad)

6.3 The No-Manipulation Assumption

Like standard RD, RKD requires that units cannot precisely manipulate their value of the running variable around the kink. The rddensity package tests for manipulation:

Listing 6: Density test for RKD

library(rddensity) density_test <- rddensity(X=x, c=0) summary(density_test)

6.4 Fuzzy RKD

When the assignment function has a kink but treatment is not a deterministic function of X (as when some individuals do not take up their UI benefits), the fuzzy RKD applies a 2SLS logic:

^τRKDfuzzy =
slope jump in Y
slope jump in D
. (3)

Both numerator and denominator are estimated via rdrobust with deriv=1 one for Y, one for D, and the ratio is taken manually.

7 Comparison to Standard RD

Feature Standard RD RKD
Identifying variation Level jump in D at c Slope change in D at c
rdrobust option deriv=0 (default) deriv=1
Recommended polynomial p=1 (local linear) p=2 (local quadratic)
Estimand Jump in E[Y|x] at c Slope jump in E[Y|x] at c
Identifying assumption Continuity of E[Y(0)|x] Continuity of ∂E[Y(0)|x]/∂x

8 Application: Austrian UI Kink

The seminal RKD application in Card et al. [2015] uses Austrian UI data with a kink at the maximum benefit level. Their estimates imply that a 10% increase in weekly UI benefits reduces exit from unemployment by approximately 1.6-2.1 percentage points per month consistent with standard search-theoretic predictions of UI generosity effects on job search effort.

9 Conclusion

The deriv=1 option in rdrobust unlocks regression kink design estimation using the same high-quality bias correction and robust inference machinery developed for standard RD. The key practical adjustments are: use local quadratic polynomials (p=2), check density continuity with rddensity, divide the rdrobust estimate by the known slope change in the assignment function, and use rdplot to visually verify the kink in both the outcome and treatment. RKD substantially expands the set of policy rules that admit credible causal identification beyond those with sharp eligibility thresholds.

References

  1. Calonico, S., Cattaneo, M. D., and Titiunik, R. (2014). Robust nonparametric confidence intervals for regression-discontinuity designs. Econometrica, 82(6):2295-2326.
  2. Card, D., Lee, D. S., Pei, Z., and Weber, A. (2015). Inference on causal effects in a generalized regression kink design. Econometrica, 83(6):2453-2483.
  3. Cattaneo, M. D., Idrobo, N., and Titiunik, R. (2019). A Practical Introduction to Regression Discontinuity Designs: Foundations. Cambridge University Press.
  4. Cattaneo, M. D., Calonico, S., and Titiunik, R. (2020). rdrobust: Software for Regression Discontinuity Designs. R package version 2.1.
  5. Imbens, G. W. and Lemieux, T. (2008). Regression discontinuity designs: A guide to practice. Journal of Econometrics, 142(2):615-635.

Continue Reading

Browse All Sections →
Home
This is some text inside of a div block.
This is some text inside of a div block.
This is some text inside of a div block.

Article Title