What is regression discontinuity?
A school district gave every student a standardised entrance exam. Anyone who scored 70 or below was automatically enrolled in a free tutoring program; anyone above was not. The post asks the central question: did the tutoring program improve exit exam scores? Because assignment is a sharp, rule-based jump at score 70, students just below the cutoff are nearly identical to those just above — and the discontinuity at the cutoff identifies the causal effect.
This app lets you turn the dials yourself. In four tabs you will: watch the discontinuity appear as the treatment effect grows; simulate the entire RD pipeline with your own sample size, noise, polynomial order and bandwidth; sweep the bandwidth from very tight to very wide and watch the LATE move just a tiny bit; and explore the post's robustness forest — bandwidths, kernels, parametric vs nonparametric, and the placebo cutoffs.
The jump at the cutoff
The animation below shows two regression lines — blue for tutored students (left of the cutoff), orange for non-tutored students (right). As the treatment effect τ grows, the blue line rises and the gap at the cutoff opens up. RDD reads off τ from exactly that gap. When τ = 0 the two lines align: no program effect. When τ ≈ 8.6 (the post's rdrobust estimate) the gap is meaningfully large.
RD Simulator
Draw new data with your chosen sample size, noise, polynomial order and bandwidth. Watch τ̂ move and see the local-linear fits on each side.
Bandwidth Lab
Sweep the bandwidth on the post's actual numbers. The estimate barely moves between h = 5 and h = 20 — that's the robustness story.
Robustness Forest
The post's headline robustness check, interactively. Toggle parametric vs nonparametric, bandwidths, kernels and placebo cutoffs.
Three key takeaways from the post
1. Tutoring works: τ̂ ≈ 9–11 points
2. The design is credible
3. The estimate is robust
Running variable
entrance_exam (range 28.8–99.8). Must be continuous-ish for nearby units to be comparable.Cutoff (c = 70)
Sharp vs fuzzy
LATE — τ
Bandwidth — h
Continuity assumption
McCrary density test
Placebo cutoffs
RD Simulator — turn the dials yourself
This panel draws a fresh dataset every time you move a slider. The true treatment effect is fixed at τ = 8.6 (the post's nonparametric estimate). The simulator fits a local polynomial on each side of the cutoff using only observations inside the bandwidth window. Try making the noise large or the bandwidth tiny — watch τ̂ wobble.
What to look for
- Bias–variance trade-off. Slide the bandwidth from 3 to 25. Tight h → fewer points → bigger SE but smaller bias (closer to the cutoff = more comparable). Wide h → smaller SE but the fits start mixing in students far from the cutoff.
- Polynomial order does not save you. A higher-order polynomial can over-fit local noise. Try p = 3 with a tight h — you will see the fitted lines bend wildly near the cutoff. rdrobust recommends p = 1 (local linear) for a reason.
- Faded points are outside the bandwidth. The cutoff line is the velvet rope. The local-poly fit only sees the bright points inside h.
- Reseed to feel the noise. τ̂ should hover near 8.6 — that's the unbiased target. The wobble around 8.6 is the variance.
Bandwidth Lab — how sensitive is τ̂ to h?
The most common concern about RDD is: "What if the bandwidth I pick changes the answer?" The post answers that on the real data with a sweep from h = 5 to h = 20. The curve below is τ̂(h) on the actual tutoring dataset. Drag the orange dot to see how the point estimate and CI move as you change h.
(= jump from treated to untreated side)
What to look for
- The curve is nearly flat. τ̂ moves by less than 1 point across a 4× range of bandwidths. That is the gold-standard robustness story: the answer does not depend on analyst discretion.
- The teal CI band fans out at low h. Tight bandwidths use few observations — the standard error grows. Wide bandwidths trade a little bit of bias for a lot of precision.
- The MSE-optimal point (h = 9.98) lives near the middle. rdrobust picks this h automatically to balance squared bias and variance — it is not the bandwidth that minimises SE.
- All CIs exclude zero. Even at h = 5 (the noisiest end), the upper end of the CI is -3.62, well below zero. The effect is detected regardless of bandwidth.
The post's robustness forest, interactively
These numbers come straight from the post's analysis.do Stata pipeline — parametric OLS, nonparametric rdrobust, bandwidth sweep, kernel comparison and the 9-cutoff placebo. Toggle outcomes and methods. Hover any point to see its SE, CI and observation count.
Outcomes
Methods (filter rows within each outcome)
What the forest tells us
- Sign conventions. The parametric panel reports the coefficient on
treat(positive: tutoring helps). The bandwidth, kernel and placebo panels use rdrobust's left-to-right convention (negative: jumping down from the treated to the untreated side). Both encode the same underlying causal claim. - Placebos straddle zero. Toggle off everything except the placebo cutoff panel: only the orange point at cutoff 70 has a CI that excludes zero. The eight placebo cutoffs (CIs in grey) all cross the dashed zero line.
- The four headline estimates cluster. Toggle just the top panel: linear (10.80), slope-flexible linear (10.80), quadratic (9.22), and rdrobust (8.58) all land between roughly 8.5 and 11. The story is invariant to specification.
Connecting back to the post
Three messages live in this single plot, one per panel:
- Top panel (parametric): see Sections 7 and 8 of the post. Four specifications, same conclusion. The treatment effect is roughly 9–11 points.
- Middle two panels (BW + kernel): Section 9.1 of the post. Robustness to analyst discretion.
- Bottom panel (placebos): Section 9.3. The discontinuity is unique to the actual program threshold.
Combined with the McCrary test (p = 0.58, see Section 9.2) and the perfectly sharp design (Section 5), the four robustness panels here are the formal back-up for the "tutoring works, the design is credible" conclusion in Section 10.