Skip to main content
v2026.11,610 entries · CC-BY 4.0

Regression Discontinuity Design: Bandwidth, Running Variable, and the McCrary Test

A practical guide to regression discontinuity design: sharp vs. fuzzy RD, what makes a running variable valid, the bias-variance trade-off in bandwidth choice, the McCrary density test for manipulation, and the placebo/robustness checks reviewers expect.

Ask about Regression Discontinuity Design: Bandwidth, Running Variable, and the McCrary Test

Answers are drawn from this guide and the rest of the CASRAI corpus, with a link to every source.

Answers are AI-generated from CASRAI’s own published pages and can be wrong, so check the linked sources before relying on one; your question is logged without personal data — never sold, never used to train a third-party model — to show us what CASRAI is missing, so please do not type personal or confidential details. How we use this

Written and maintained by CASRAI Editorial Board

Last updated

Regression discontinuity design (RDD) identifies a causal effect by comparing units just above and just below a cutoff on some continuously measured variable — a test score, an income threshold, a funding-priority ranking. Treatment assignment flips sharply at that cutoff, so units on either side, being otherwise nearly identical, provide a credible estimate of the treatment effect at the threshold. This guide covers the three things a referee or methods reviewer checks first: whether the running variable is actually valid, how the bandwidth around the cutoff was chosen, and whether the McCrary density test rules out manipulation of assignment.

RDD sits alongside other quasi-experimental designsdifference-in-differences, propensity score matching, instrumental variables — as a way to approximate a randomized comparison without actually randomizing. See experimental vs. quasi-experimental design for how it fits among the alternatives.

Sharp vs. fuzzy RDD

In sharp RDD, the cutoff determines treatment perfectly: every unit above the threshold is treated, every unit below is not (a scholarship awarded strictly to applicants scoring above a cutoff, for example). The treatment effect is estimated as the jump in the outcome’s regression function at the cutoff.

In fuzzy RDD, crossing the cutoff changes the probability of treatment rather than assigning it deterministically — some eligible units don’t take up the treatment, or some ineligible units get it anyway (eligibility for a program that isn’t universally taken up). Fuzzy RDD is estimated as an instrumental-variables problem: the discontinuity in treatment probability at the cutoff instruments for actual treatment status, and the resulting estimate is a local average treatment effect (LATE) for units near the cutoff, not an average treatment effect for the full sample.

What makes a valid running variable

The running variable (also called the forcing variable or assignment variable) is what the treatment decision is based on. For the design to identify a causal effect, the running variable has to satisfy conditions that are easy to state and routinely violated in practice:

  • It determines assignment via a known, fixed rule. The cutoff and the direction of assignment (above vs. below) must be established independently of the outcome being measured — not chosen after seeing which threshold produces the cleanest-looking effect.
  • It is continuously distributed through the cutoff. A running variable with large mass points or heavy rounding right at the threshold (common with self-reported scores, or variables rounded to whole numbers) makes the local comparison unreliable, because “just above” and “just below” stop being genuinely comparable groups.
  • Units cannot precisely manipulate their own value of it, at least not right at the cutoff. This is the assumption the McCrary test is built to check, and it is the single most common way published RDD papers get challenged — see below.
  • All other determinants of the outcome are continuous through the cutoff. This is the design’s core identifying assumption: nothing else that affects the outcome should also jump discontinuously at the same point. If a second policy changes at the identical threshold, the RD estimate conflates the two effects and can’t isolate either one.

A running variable that fails the first two conditions outright is usually a fatal design flaw, not something a robustness check can repair. The third and fourth are what the checks in this guide are for.

Choosing a bandwidth: the bias-variance trade-off

RDD estimates the treatment effect using only observations within some window — the bandwidth — on either side of the cutoff. That window size is the single most consequential analytical choice in an RDD paper, because it trades two errors against each other directly:

  • A wide bandwidth includes more observations, which lowers the estimator’s variance (more precision, tighter confidence intervals) — but it also pulls in units farther from the cutoff, where the assumption that treated and untreated units are otherwise comparable gets weaker. That increases bias, because the local regression is now fitting a relationship that may not hold uniformly across the whole window.
  • A narrow bandwidth keeps the comparison closer to the cutoff, where comparability is most defensible, reducing bias — but with fewer observations, the estimate becomes noisier and confidence intervals widen. Taken to an extreme, an overly narrow window can leave too few observations near the cutoff to estimate anything precisely.

Two practical choices follow from this trade-off:

Local-linear estimation over global polynomials. A common early mistake is fitting a single high-order polynomial to the full running-variable range on each side of the cutoff, in the hope that a flexible enough curve captures the true relationship. Simulation and theoretical work on this design has shown that high-order global polynomials tend to produce poorly behaved estimates near the boundary — exactly where the RD estimate is evaluated — including erratic sensitivity to which observations happen to sit at the extremes of the sample. The now-standard alternative is local-linear (or local-quadratic) regression restricted to a bandwidth around the cutoff, which avoids extrapolating a global curve into the one region — the boundary — where extrapolation is least trustworthy.

Data-driven bandwidth selection over an eyeballed window. Rather than picking a bandwidth by inspection, the standard practice is to use a data-driven selector that minimizes an estimate of the mean squared error of the RD estimator, balancing the bias-variance trade-off algorithmically instead of by hand. Imbens and Kalyanaraman’s optimal-bandwidth procedure was an early influential version of this; Calonico, Cattaneo, and Titiunik’s MSE-optimal bandwidth, paired with their robust bias-corrected (RBC) confidence intervals, is now the more common default — robust bias-correction matters because the same bandwidth that is optimal for point estimation is, by construction, not optimal for inference, and naively using it for both understates uncertainty. Software implementations of these selectors (the rdrobust family in R, Stata, and Python) are the standard tool referees now expect to see used, rather than an ad hoc bandwidth choice with no stated selection rule.

Whatever selector produces the headline bandwidth, report the estimate at that bandwidth alongside estimates at a range of narrower and wider bandwidths (a bandwidth sensitivity table or plot). An effect that only appears at one specific bandwidth and vanishes as the window is halved or doubled is a warning sign, not a robust finding.

The McCrary density test

If units can manipulate their own running-variable value to land on the favorable side of the cutoff — a grant reviewer nudging a borderline score up, an applicant who knows the exact income threshold adjusting reported earnings — the comparison between “just above” and “just below” stops being a comparison of otherwise-similar units. Manipulation that concentrates near the cutoff is exactly the threat the running-variable conditions above are meant to rule out, and it needs a direct check rather than an assumption.

The standard check is the McCrary density test (McCrary, 2008, Journal of Econometrics 142(2), 698–714), which asks a specific empirical question: is there a discontinuity in the density of the running variable itself at the cutoff? Under the assumption that units cannot precisely control their assignment value, the density of the running variable should be continuous through the threshold — there is no reason the number of units just below the cutoff should differ sharply from the number just above it, absent manipulation. A visible jump in density right at the cutoff (a pile-up of observations just past the threshold, a gap just before it) is evidence that units are sorting themselves across the line, which undermines the design.

Mechanically, the test partitions the running variable into bins on each side of the cutoff, fits a local-linear regression to the resulting histogram-based density estimate on each side, and tests whether the two fitted densities meet at the same value at the cutoff. A large, statistically significant discontinuity in the estimated density is the red flag; a small, non-significant one is the result a well-behaved running variable should produce.

Two things worth stating precisely when reporting this test: failing to reject the null (no significant density discontinuity) is evidence consistent with no manipulation, not proof that none occurred — the test has no power against manipulation that doesn’t change the running variable’s density, only against the sorting-based kind. And a newer local-polynomial density estimator (Cattaneo, Jansson, and Ma) is now a common alternative or complement to the original binned McCrary approach — it avoids the original test’s sensitivity to bin-width choice and is implemented alongside the same rdrobust tooling used for bandwidth selection, so many recent papers report both.

Placebo and robustness checks reviewers now expect

The density test checks one specific threat (sorting on the running variable). A complete robustness section checks the others:

  • Covariate balance at the cutoff. Run the same RD estimation using predetermined covariates — characteristics fixed before assignment, which the treatment cannot have caused — as the outcome instead of the actual outcome of interest. These should show no discontinuity at the cutoff. A covariate that does jump at the threshold suggests the two sides differ in some way other than treatment status, which threatens the core continuity assumption directly.
  • Placebo cutoffs. Re-run the RD estimation at cutoff values where no real treatment discontinuity exists (for instance, the median of the running variable within the treated or untreated subsample only). A genuine effect should be specific to the real cutoff; an effect that also shows up at arbitrary placebo cutoffs suggests the estimator is picking up something other than the treatment.
  • Donut-hole RDD. Re-estimate after excluding observations within a small distance of the cutoff on both sides. If the effect is being driven by a handful of observations sitting exactly at the boundary — often the ones most likely to be manipulated, if manipulation exists — the estimate should be reasonably stable when the closest points are dropped.
  • Varying bandwidth and polynomial order. As above: report the estimate across a range of bandwidths (narrower and wider than the selector’s optimum) and, separately, across local-linear vs. local-quadratic specifications. Report the sensitivity, not just the single preferred specification.
  • An RD plot. A binned-scatter plot of the outcome against the running variable, with separate local polynomial fits on each side of the cutoff, is close to mandatory in current practice — it lets a reader see the discontinuity (or its absence) directly, rather than taking the regression coefficient on faith.

Reporting an RDD analysis

A methods or results section that will survive review typically states, explicitly: whether the design is sharp or fuzzy; the exact cutoff value and the assignment rule; the bandwidth selection procedure used (named, not just a number); the estimator (local-linear or local-quadratic, and whether bias-corrected inference was used); the result of the density-manipulation test; the covariate-balance results; and the estimate’s sensitivity to bandwidth and specification choices. Reviewers in fields where RDD is common now treat several of these — the density test and a bandwidth sensitivity table in particular — as close to required rather than optional, and their absence is one of the more common reasons an RDD submission comes back with revisions.

Frequently asked questions

What is regression discontinuity design used for?

RDD is used whenever treatment or program assignment is based on whether a continuous variable crosses a known cutoff — scholarship or aid eligibility above a test-score or income threshold, program enrollment above a priority-ranking cutoff, regulatory thresholds based on firm size or age. It is common in economics, education research, health policy, and program evaluation wherever a real administrative rule creates a sharp or near-sharp assignment cutoff.

What’s the difference between sharp and fuzzy RDD?

In sharp RDD, crossing the cutoff changes treatment status from 0 to 1 with certainty. In fuzzy RDD, crossing the cutoff changes only the probability of treatment, and the design is estimated as an instrumental-variables model, yielding a local average treatment effect rather than a simple jump in the outcome.

How do you choose a bandwidth for RDD?

Use a data-driven MSE-optimal bandwidth selector (Imbens-Kalyanaraman or Calonico-Cattaneo-Titiunik are the standard choices, both implemented in the rdrobust software family) rather than an eyeballed window, pair it with robust bias-corrected confidence intervals, and report the estimate’s sensitivity across a range of narrower and wider bandwidths.

What does the McCrary test actually test?

It tests whether the density of the running variable is continuous through the cutoff. A statistically significant jump in density right at the threshold suggests units are manipulating their assignment value to land on the favorable side, which undermines the comparison the design relies on.

Does passing the McCrary test prove there’s no manipulation?

No. Failing to reject the null is evidence consistent with no manipulation, not proof of it — the test only has power against manipulation that shows up as a density discontinuity at the cutoff, not against every possible way an assignment process could be compromised.

Why shouldn’t I use a high-order polynomial across the whole running-variable range?

High-order global polynomials are known to behave poorly near the boundary of the data — exactly where the RD estimate is evaluated — and can be highly sensitive to observations at the extremes of the sample. Local-linear or local-quadratic regression within a bandwidth around the cutoff is the current standard precisely to avoid this.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 44,322 indexed passages, and every answer cites the ones it drew on.