RDD, or regression discontinuity design, compares units near a rule cutoff. It can estimate a local effect if the design rules hold. This may help with ROI choices. This guide shows how to set it up, with a simulated example you can re-run.

What is Regression Discontinuity?

Regression discontinuity is a quasi-experimental design that estimates causal effects when treatment assignment is determined by whether an observed variable (the "running variable") crosses a known threshold. Unlike a randomized experiment, RDD can use existing administrative cutoffs to compare units just above and below the threshold.

To test whether crossing a threshold caused a change in your own data, try the free regression discontinuity tool.

RDD compares units just below and above a cutoff (like scoring 69 and 70 on a test). It can find a local effect if other causes of the result shift in a smooth way at the cutoff, and the rule sets treatment as stated.

RDD comes in two primary forms:

  • Sharp RDD: Treatment is deterministically assigned based on the threshold. Everyone above the cutoff receives treatment; everyone below does not.
  • Fuzzy RDD: The threshold changes the probability of treatment but does not guarantee it. Some individuals above the cutoff may not receive treatment, or some below may receive it.

Using Existing Data

Regression discontinuity can use existing administrative data rather than a new experiment. It can estimate a local effect if the design rules hold. This may help with ROI choices.

When to Use Regression Discontinuity

RDD is ideal when you face these conditions:

Clear Assignment Rules

Your organization must have an explicit, documented threshold that determines treatment. Common examples include:

  • Age-based eligibility: Senior discounts at age 65, retirement benefits, minimum age requirements
  • Performance thresholds: Bonus structures tied to sales quotas, promotion criteria based on evaluation scores
  • Financial cutoffs: Credit limits based on income levels, subsidy eligibility tied to poverty lines
  • Geographic boundaries: School district assignments, tax jurisdiction differences, zoning regulations
  • Time-based rules: Policy implementation dates, deadline-driven program access

Sufficient Data Near the Threshold

You need adequate observations close to the cutoff. Check if the chosen range and sample give enough precision for the choice. The needed sample depends on the data and the effect you need to find. Sparse data near the cutoff leads to imprecise estimates.

No Manipulation of the Running Variable

Individuals or administrators cannot precisely control the running variable to game the threshold. For example, if students can retake tests until they pass a cutoff, or if credit applicants can strategically adjust reported income, the RDD assumptions break down and estimates become biased.

Using Existing Programs

Before investing in new experimental programs, use RDD to evaluate similar existing policies. Analyzing historical data around eligibility thresholds may show how a program performs near the cutoff, which can inform expansion or termination decisions.

Worked Example (Simulated): A Jump at a Cutoff

Question. Does the result change at the cutoff in these made-up data? Inputs. Simulated data, seed 42: 2000 units with a running variable spread evenly from -1 to 1. Treatment starts at a score of zero. The outcome follows a smooth curve (with a squared term) plus random noise, and the built-in jump at the cutoff is 3.000 outcome units. Method. Fit a straight line on each side of the cutoff, using units within +/-0.4 of it. The jump estimate is the treatment term. The script reports an HC1 robust standard error (HC1 is a way to allow for uneven noise) and an approximate 95% range.

import numpy as np

seed = 42
rng = np.random.default_rng(seed)
n = 2000
x = rng.uniform(-1, 1, n)
treated = (x >= 0).astype(float)
noise = rng.normal(0, 1, n)
y = 2 + 1.5 * x + 0.5 * x**2 + 3 * treated + noise
h = 0.4
keep = np.abs(x) <= h
xw = x[keep]
tw = treated[keep]
yw = y[keep]
X = np.column_stack([np.ones(len(xw)), xw, tw, xw * tw])
beta = np.linalg.lstsq(X, yw, rcond=None)[0]
resid = yw - X @ beta
bread = np.linalg.inv(X.T @ X)
meat = X.T @ ((resid**2)[:, None] * X)
# HC1 heteroskedasticity-robust covariance
cov = (len(yw) / (len(yw) - X.shape[1])) * bread @ meat @ bread
se = np.sqrt(cov[2, 2])
ci = (beta[2] - 1.96 * se, beta[2] + 1.96 * se)
print(f"Seed: {seed}")
print(f"Total units: {n}")
print(f"Units within bandwidth +/-{h:.1f}: {len(yw)}")
print(f"Estimated jump at cutoff: {beta[2]:.3f}")
print(f"HC1 standard error: {se:.3f}")
print(f"Approximate 95% interval: [{ci[0]:.3f}, {ci[1]:.3f}]")
print(f"Known simulated jump: 3.000")

Printed output:

Seed: 42
Total units: 2000
Units within bandwidth +/-0.4: 782
Estimated jump at cutoff: 2.796
HC1 standard error: 0.144
Approximate 95% interval: [2.513, 3.078]
Known simulated jump: 3.000

Result. With 782 of the 2000 units inside the window, the jump estimate is 2.796 outcome units, with an HC1 standard error of 0.144 and an approximate 95% interval of [2.513, 3.078]. The built-in jump of 3.000 lies inside that interval, and the estimate sits 0.204 below it.

Limit. This is one simulated run; it shows how the numbers are read, not how any real data behaves. The script sets treatment with a clean cutoff, so it cannot show whether real data fit the design rules, or whether an effect near the cutoff also holds for units far from it. The bandwidth 0.4 was chosen by hand, not by a data-driven rule, and the outcome curve includes a squared term that the straight-line fit in the window only approximates.

Sources. White H (1980). A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica. doi.org/10.2307/1912934. Covers: heteroskedasticity-consistent standard errors (the script uses the HC1 variant).

Data Requirements for Regression Discontinuity

Successful RDD implementation requires four essential data elements:

1. Running Variable (Forcing Variable)

This continuous variable determines treatment assignment. It must be measured before treatment occurs and should be precisely recorded. Examples include test scores, age in days, income levels, or application timestamps. The running variable should have enough variation near the threshold to support local estimation.

2. Treatment Indicator

A binary variable indicating whether each unit received treatment. In sharp RDD, this perfectly corresponds to being above or below the threshold. In fuzzy RDD, the threshold affects treatment probability but does not determine it completely.

3. Outcome Variable

The metric you want to measure the treatment effect on. This could be revenue, customer retention, employee productivity, cost per acquisition, or any other business KPI. The outcome must be measured after treatment occurs and should be available for both treated and control units.

4. Baseline Covariates (Optional but Recommended)

Pre-treatment characteristics that help check the RDD design and can improve precision. These variables should not be affected by treatment and should show no discontinuity at the threshold if the design is valid. Common examples include demographic characteristics, historical performance metrics, and geographic indicators.

Data Quality Checklist

  • Running variable has no missing values near the cutoff
  • Outcome data is available for most units; report how many are missing
  • Treatment assignment follows documented rules
  • Threshold value is precisely known and consistently applied
  • Data collection predates your analysis to avoid selection bias

Setting Up Your Regression Discontinuity Analysis

An RDD analysis follows a structured workflow.

Step 1: Visualize the Discontinuity

Begin with exploratory visualization. Plot the outcome variable against the running variable, marking the threshold with a vertical line. Divide the running variable into bins and calculate average outcomes within each bin. A clear visual discontinuity at the threshold provides initial evidence of a treatment effect.

Create separate plots for baseline covariates. These should show smooth trends across the threshold. Any discontinuities in pre-treatment variables suggest potential confounding or manipulation.

Step 2: Test for Manipulation

Examine the density of the running variable around the threshold. Create a histogram with narrow bins and look for unusual bunching or gaps exactly at the cutoff. Formal tests like the McCrary density test detect statistically significant manipulation.

If you detect manipulation, consider whether it invalidates the design or merely requires additional robustness checks. Minor manipulation may be addressed through donut-hole RDD designs that exclude observations immediately adjacent to the threshold.

Step 3: Select Bandwidth

The bandwidth determines which observations near the threshold are included in the analysis. Larger bandwidths increase sample size and precision but risk including dissimilar units. Smaller bandwidths improve comparability but reduce statistical power.

Data-driven bandwidth selectors like the Imbens-Kalyanaraman or Calonico-Cattaneo-Titiunik methods aim to balance bias and variance. They differ in how they choose the bandwidth, so check the documentation of the one you use.

Always report results using multiple bandwidths (e.g., 0.5x, 1x, and 2x the optimal bandwidth) to demonstrate robustness. If estimates change dramatically across bandwidth choices, investigate further or acknowledge the sensitivity.

Step 4: Choose Estimation Method

Several estimation approaches are available:

  • Local linear regression: Fits separate linear regressions on each side of the threshold using observations within the bandwidth. This is a common choice because it is simple and flexible near the boundary.
  • Polynomial regression: Fits global polynomials of various orders. High-order polynomials (cubic or higher) can overfit and be sensitive to specification choices.
  • Local polynomial regression: Extends local linear regression to quadratic or higher orders within the bandwidth, useful when curvature is evident.

Step 5: Implement Robust Inference

Standard errors must account for potential heteroskedasticity and correlation structures in your data. Heteroskedasticity-consistent standard errors (White 1980, listed under Sources) or cluster-robust standard errors (when data has natural groupings) may give more reliable inference.

For fuzzy RDD designs, use instrumental variables estimation where the threshold serves as an instrument for treatment receipt. The local average treatment effect (LATE) estimates the causal effect for compliers. Those whose treatment status is changed by the threshold.

Interpreting the Estimate for ROI Choices

Interpretation decides how far a statistical result can inform a business choice.

Understanding the Local Average Treatment Effect

RDD estimates the treatment effect at the threshold, not the average effect across all individuals. This local effect applies to the marginal unit: the person or entity just meeting the eligibility criterion. For business decisions, ask whether the marginal case represents your target population or strategic interest.

Quantifying Business Impact

Translate statistical estimates into financial metrics. Suppose, with made-up figures, that RDD showed a loyalty program raises customer lifetime value by 150 dollars for customers at the spending threshold. A real ROI estimate needs customer results and costs for the same time span.

Assessing Generalizability

Consider whether effects at the threshold generalize to other points in the running variable distribution. If treatment effects are heterogeneous, extrapolating results far from the cutoff becomes risky. Use economic theory or domain knowledge to reason about effect heterogeneity.

Communicating Results to Stakeholders

Present findings with clear visualizations showing the discontinuity, confidence intervals reflecting statistical uncertainty, and sensitivity analyses demonstrating robustness. Simple comparisons around the threshold, with the estimate and its range, may help non-technical stakeholders.

Key Takeaway: RDD Gives a Local Estimate

Regression discontinuity gives an estimate of the effect near the cutoff if the design rules hold. Analyzing existing policy thresholds may help judge whether a program works near that cutoff. It does not show effects for units far from it.

Applying It: A Loyalty Program Threshold

Consider a hypothetical e-commerce company that offers free premium shipping to customers who spend over 500 dollars in a calendar year. Management wants to know whether premium shipping changes a customer value measure. No customer data is shown here; this section only sets out how RDD would be applied.

The Setup

The company would need data on:

  • Running variable: Annual spending in the year preceding program eligibility
  • Treatment: Premium shipping access (assigned exactly at 500 dollars)
  • Outcome: A customer value measure, recorded after treatment

The Analysis

In the made-up data of the worked example above, a local line fit gives a jump of 2.796 outcome units. Its approximate 95% range is [2.513, 3.078]. These figures come from the script above, not customer data.

The Business Decision

The made-up estimate alone does not show a business gain. A real ROI estimate needs customer results and costs for the same time span.

Best Practices for Regression Discontinuity

Follow these guidelines to ensure methodological rigor and business relevance:

Specification Robustness

  • Report results across multiple bandwidth choices to demonstrate stability
  • Compare local linear regression to polynomial specifications
  • Test sensitivity to different kernel functions (uniform, triangular, Epanechnikov)
  • Exclude observations very close to the threshold (donut-hole RDD) if manipulation is suspected

Validation Checks

  • Check for discontinuities in baseline covariates at the threshold
  • Test for smooth density of the running variable (McCrary test)
  • Conduct placebo tests at artificial thresholds where no treatment occurs
  • Examine heterogeneity by subgroups to understand variation in treatment effects

Documentation and Transparency

  • Preregister your analysis plan before examining the data when possible
  • Document all specification choices, including bandwidth selection methods
  • Report all sensitivity analyses, not just preferred specifications
  • Make code and data available for replication when permitted

Practical Implementation

  • Use established software packages (rdrobust in R or Stata) rather than custom implementations
  • Automate diagnostic plots and tests for efficiency and reproducibility
  • Build reusable analysis pipelines for recurring RDD applications
  • Train multiple team members in RDD methods to avoid single points of failure

Related Causal Inference Techniques

Regression discontinuity is one of several quasi-experimental methods for causal inference. The choice among them depends on your data.

Difference-in-Differences

When you have panel data and treatment timing varies across groups, difference-in-differences may be more appropriate than RDD. This method compares changes over time in treated groups to changes in control groups, controlling for time-invariant confounders.

Synthetic Control

For single or few treated units with rich time-series data, synthetic control methods construct weighted combinations of control units that closely match the treated unit's pre-treatment trajectory. It is used for case studies like policy changes affecting entire regions or countries.

Causal Impact Analysis

When analyzing the effect of a single intervention in time-series data without a natural threshold, Causal Impact with Bayesian structural time-series models provides an alternative framework. This method forecasts what would have happened without intervention and compares it to observed outcomes.

Propensity Score Matching

Without clear thresholds or panel structure, propensity score matching creates balanced treatment and control groups based on observed covariates. While matching requires stronger assumptions than RDD, it applies to broader settings where treatment assignment is not threshold-based.

Cost-Saving Implementation Strategies

These practical strategies may help you get more from RDD analyses:

Leverage Existing Data Infrastructure

RDD analyses use administrative data already collected for operational purposes. Rather than building new data collection systems, identify existing thresholds in your organization (credit approvals, promotion criteria, program eligibility) and extract relevant data from current systems. This may cost less than building new data collection.

Automate Recurring Analyses

Many organizations have ongoing programs with stable thresholds. Build automated pipelines that update RDD estimates quarterly or annually as new data accumulates. Automation can turn a one-time analysis into continuous monitoring of program effectiveness.

Prioritize High-Stakes Decisions

Focus RDD resources on decisions with substantial financial implications. Analyzing whether to expand a large program may justify significant analytical effort. Evaluating minor operational changes may not warrant the same investment.

Build Internal Expertise

Training existing analysts in RDD methods may cost less than hiring external consultants. Workshops, mentorship, and hands-on projects can build internal skill.

Integrate with Decision Workflows

Embed RDD analyses into formal decision processes. Require evidence of program effectiveness at thresholds before budget renewals. Mandate impact evaluations for new threshold-based policies. Integration may help analyses feed decisions rather than sit unused.

Conclusion

Regression discontinuity design can estimate a local effect from threshold-based administrative rules, if the design rules hold. It compares units just above and below a policy cutoff.

RDD can use existing data and needs no operational changes. It may be applied to customer loyalty programs, employee incentive structures, or public policy interventions; any business value depends on the data and the costs.

Success requires attention to methodological details: testing for manipulation, selecting appropriate bandwidths, conducting robustness checks, and correctly interpreting local treatment effects. When the setting fits, an administrative threshold can serve as a natural experiment for a local effect.

Start by identifying threshold-based policies in your organization. Gather data on running variables, treatment assignment, and outcomes. Apply the structured workflow outlined in this guide. Then check the design rules before you act on the estimate.