Skip to main content
ExplainerCausal InferenceMethodology Explainer· 5 min read· in Data & Analysis

How Local Randomization Near a Cutoff Isolates Causal Effects in Observational Data

By treating the narrow window around an arbitrary threshold as a pure lottery, researchers can replicate the rigor of a clinical trial without running one.

By Mateo Ramos

Design-Based Empiricists 45%Algorithmic Methodologists 30%Applied Econometricians 25%
Design-Based Empiricists
Argue that treating the cutoff as a pure lottery is the most transparent way to establish causality without relying on complex models.
Algorithmic Methodologists
Focus on developing the mathematical and computational tools required to select the optimal window without researcher bias.
Applied Econometricians
Emphasize the trade-offs between the strict assumptions of local randomization and the statistical power gained by using continuity frameworks.

Perspectives this story doesn't cover

  • Clinical Trial Advocates
  • Machine Learning Theorists

Summary

  • Regression discontinuity designs use arbitrary cutoffs to mimic randomized controlled trials in observational data.
  • The local randomization framework assumes treatment assignment is a pure lottery within a very narrow window around the threshold.
  • Researchers must mathematically balance the window size to maintain identical subject traits without losing statistical power.
  • If subjects can manipulate their scores to cross the boundary, the randomization assumption collapses and the design is invalid.

When a medical guideline dictates that patients with a blood pressure of 140 mm Hg receive medication while those at 139 mm Hg do not, the arbitrary boundary dictates treatment. This sharp division creates a natural laboratory for researchers. By comparing the individuals immediately adjacent to the threshold, statisticians isolate the exact impact of the drug without running a multi-million-dollar randomized controlled trial, because the patients on either side of that one-point divide are biologically indistinguishable.

This mechanism is the foundation of the Regression Discontinuity Design (RDD). According to a foundational 2007 guide published by the National Bureau of Economic Research, this approach leverages the fact that subjects cannot precisely manipulate their position around a strict cutoff. As authors David Lee and Thomas Lemieux note in the paper, "the RD design is often thought to be the most credible non-experimental research design" because it closely mimics a true experiment.[1]

Historically, researchers interpreted RDD through a continuity framework, assuming that potential outcomes change smoothly across the threshold and using regression lines to extrapolate to the boundary. However, a distinct methodological branch has formalized the "local randomization" framework. As detailed in a 2018 review published on arXiv, this approach explicitly assumes that within a very narrow window around the cutoff, the assignment of treatment is as good as random.[4]

The distinction matters fundamentally for how evidence is weighed and processed. In the continuity approach, researchers use data from far away from the cutoff to fit their models. The local randomization approach, outlined by methodologists at Princeton University and Cambridge University Press, discards the distant data entirely. It treats the narrow band—for example, test scores falling strictly between 84.5 and 85.5—as a pure lottery, analyzing it exactly as one would analyze a clinical trial.[3][6]

The local randomization framework discards distant data, treating only the narrow window around the cutoff as a valid experiment.

To execute this, analysts rely on specific computational tools designed to find that perfect window. The `rdlocrand` package, detailed in the Stata Journal in 2016 and maintained as an open-source repository on GitHub, provides the algorithmic infrastructure. It allows researchers to systematically select the bandwidth where baseline characteristics—like age, income, or prior education—are statistically identical on both sides of the divide.[5][7]

To execute this, analysts rely on specific computational tools designed to find that perfect window.

Finding that window requires a delicate mathematical balance. If the window is too wide, the subjects on either side are no longer identical; the student scoring 90 is fundamentally different from the student scoring 80. If the window is too narrow, the sample size drops to a level where statistical power vanishes, making it impossible to distinguish a true effect from random noise with a standard p-value of 0.05.

A 2017 analysis published by Emerald Group Publishing explored this exact trade-off when interpreting RDD as a local experiment. The authors demonstrated that the validity of the causal claim rests entirely on the inability of subjects to sort themselves across the boundary. If a student knows the scholarship cutoff is 85 and can retake the test until they hit exactly 85.1, the randomization assumption collapses entirely.[8]

To detect this manipulation, researchers deploy density tests, most notably the McCrary sorting test. If the distribution of the running variable—the score or metric determining treatment—shows a massive spike immediately above the cutoff and a hollowed-out valley immediately below it, it signals that individuals have gamed the system. In such cases, the local randomization framework cannot be applied, and any causal claims are void.

Density tests reveal when subjects manipulate their scores to cross the threshold, invalidating the randomization assumption.

When the assumptions hold, the results are remarkably robust and have reshaped multiple fields. In political science, local randomization is frequently used to study the incumbency advantage by examining elections decided by less than a 1 percent margin. The municipality where a candidate won by 50.1 percent is virtually identical to the one where they lost with 49.9 percent, isolating the pure effect of holding office from the underlying political leanings of the town.

The framework also demands rigorous covariate balance checks before any conclusions are drawn. Before looking at the final outcome, researchers must prove that the treatment and control groups within the window share identical pre-treatment traits. If the algorithm selects a window where the average age is 42 on one side and 48 on the other, the local randomization assumption is violated, and the window must be narrowed.

Covariate balance checks ensure that the groups on either side of the cutoff are statistically identical before treatment is applied.

The evolution of these methods reflects a broader shift in empirical economics and data science toward design-based inference. Rather than relying on complex, opaque models to adjust for hundreds of confounding variables, the local randomization approach forces the researcher to find a transparent, naturally occurring lottery in the data, making the assumptions visible and testable.[2]

The external validity of these findings remains strictly bounded by the mathematics of the design. The treatment effect calculated at the cutoff applies only to the individuals near that cutoff. Whether a medication works for a patient with a blood pressure of 180 mm Hg, or a scholarship helps a student scoring 95, cannot be answered by the discontinuity. The precision of the local experiment is achieved precisely by sacrificing the ability to generalize globally, leaving researchers to weigh the absolute certainty of a narrow claim against the uncertainty of a broad one.[9]

1960
Year RDD was first introduced
50.1%
Typical threshold for election RDDs
1%
Margin defining a close election window

Chronology

  1. 1960

    Donald Thistlethwaite and Donald Campbell introduce the regression discontinuity design to study the impact of merit scholarships.

  2. 1999

    Economists Hahn, Todd, and Van der Klaauw formalize the econometric identification of RDD, sparking widespread adoption.

  3. 2007

    The National Bureau of Economic Research publishes the definitive guide to practice for empirical researchers using the method.

  4. 2016

    The rdlocrand package is published, providing the algorithmic tools necessary to execute the local randomization framework.

Limits of the evidence

  • How to definitively prove that subjects did not manipulate their position near the cutoff in historical datasets where density tests are inconclusive.
  • The exact point at which the local randomization assumption breaks down as the window expands in highly complex, multi-dimensional data.
  • Whether the treatment effects observed strictly at the threshold apply to individuals far away from the cutoff.

Sources

Source coverage

9 outlets

3 viewpoints surfaced

Design-Based Empiricists 45%Algorithmic Methodologists 30%Applied Econometricians 25%
  1. [1]National Bureau of Economic ResearchDesign-Based Empiricists

    Regression Discontinuity Designs: A Guide to Practice

    Read on National Bureau of Economic Research
  2. [2]Annual ReviewsApplied Econometricians

    Regression Discontinuity Designs

    Read on Annual Reviews
  3. [3]Cambridge University PressApplied Econometricians

    A Practical Introduction to Regression Discontinuity Designs: Extensions

    Read on Cambridge University Press
  4. [4]arXivAlgorithmic Methodologists

    The Local Randomization Framework for Regression Discontinuity Designs: A Review and Some Extensions

    Read on arXiv
  5. [5]Stata JournalAlgorithmic Methodologists

    Inference in Regression Discontinuity Designs under Local Randomization

    Read on Stata Journal
  6. [6]Princeton UniversityDesign-Based Empiricists

    Regression Discontinuity Designs

    Read on Princeton University
  7. [7]GitHubAlgorithmic Methodologists

    GitHub - rdpackages/rdlocrand: Local Randomization Methods for RD Designs

    Read on GitHub
  8. [8]Emerald Group PublishingApplied Econometricians

    On Interpreting the Regression Discontinuity Design as a Local Experiment

    Read on Emerald Group Publishing
  9. [9]Factlen Editorial Team

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team

Comments

Stay informed

Every angle. Every day.

Get Data & Analysis stories with full source coverage and perspective breakdowns delivered to your inbox.