← Latest papers
📈 economics

rd2d: Causal Inference in Boundary Discontinuity Designs

This paper introduces \pkg{rd2d}, a comprehensive software package for R, Python, and Stata that implements local polynomial estimation and inference for Boundary Discontinuity designs, offering features such as automatic bandwidth selection, robust bias correction, and cluster-robust inference, which are demonstrated through an empirical application to Opportunity Zones.

Original authors: Matias D. Cattaneo, Rocio Titiunik, Ruiqi Rae Yu

Published 2026-05-29
📖 5 min read🧠 Deep dive

Original authors: Matias D. Cattaneo, Rocio Titiunik, Ruiqi Rae Yu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to figure out if a new policy actually helps people. In the world of statistics, researchers often use a clever trick called a "Regression Discontinuity" (RD) design. Think of this like a cliff edge.

In a standard RD design, imagine a single line on a map. If you live just to the left of the line, you get a scholarship (Treatment). If you live just to the right, you don't (Control). Because the people living right next to the line are almost identical in every way except for which side of the line they fall on, you can compare them to see if the scholarship actually works.

The Problem: The World is 2D, Not 1D
The paper rd2d: Causal Inference in Boundary Discontinuity Designs points out that real life isn't just a single line; it's a whole map. Sometimes, eligibility for a program depends on two things at once.

For example, to qualify for an "Opportunity Zone" (a tax break for poor areas), a neighborhood might need to be:

  1. Poor enough (Low Income), AND
  2. Have a high enough poverty rate.

This creates a boundary that looks like an "L" shape on a map, not a straight line. This is called a Boundary Discontinuity (BD) design. The challenge is: How do you compare neighborhoods that are right next to this weird, two-dimensional "L" shaped line?

The Solution: The rd2d Software
The authors (Cattaneo, Titiunik, and Yu) have built a new software tool called rd2d (available for R, Python, and Stata) to solve this math puzzle. They offer two main ways to look at the data, like two different pairs of glasses:

1. The "Location" Glasses (The Direct Approach)

This method looks at the map exactly as it is. It treats the neighborhood's poverty score and income score as two separate coordinates (like Latitude and Longitude).

  • How it works: It draws a tiny circle around every point on that "L" shaped boundary and compares the people inside the circle on the "Treatment" side to those on the "Control" side.
  • Why it's good: It uses all the information available. It's like looking at a high-resolution photo where you can see every detail of the terrain.
  • The Catch: It's computationally heavy because it has to do complex math in two dimensions at once.

2. The "Distance" Glasses (The Simplified Approach)

This method simplifies the map. Instead of looking at two scores, it asks: "How far is this neighborhood from the boundary line?"

  • How it works: It converts the 2D map into a single line. If you are 1 mile inside the "Treatment" zone, your score is +1. If you are 1 mile outside, your score is -1.
  • Why it's good: It turns a complex 2D problem back into a simple 1D problem (like the original cliff edge). It's easier to calculate and easier to explain.
  • The Catch: It loses some detail. If the boundary line has a sharp corner (a "kink"), this method might get confused, just like a GPS that tries to drive a car around a sharp turn using only a straight road map.

What the Software Actually Does
The rd2d package doesn't just draw pictures; it does heavy statistical lifting:

  • Automatic Tuning: It automatically decides how big a "magnifying glass" (bandwidth) to use. If the glass is too small, the picture is grainy (too much noise). If it's too big, you blur out the details. The software finds the perfect size.
  • Fuzzy vs. Sharp: Sometimes, crossing the line guarantees you get the treatment (Sharp). Other times, crossing the line just increases your chances of getting it (Fuzzy). The software handles both.
    • Analogy: A "Sharp" design is like a vending machine: put in the coin, get the soda. A "Fuzzy" design is like a lottery: buying a ticket increases your odds, but doesn't guarantee a win.
  • The "Opportunity Zones" Test Drive: The authors tested their software on a real-world example: Opportunity Zones.
    • The Setup: They looked at whether being designated as an Opportunity Zone actually created jobs.
    • The Result: They found that being eligible did strongly increase the chance of getting the designation (the "First Stage" worked). However, looking at the actual job growth, the software found no significant evidence that the zones created jobs in the early years. The effect was too small to distinguish from random noise.
    • The Comparison: They ran the analysis using both the "Location" and "Distance" methods. Both methods agreed: The policy worked to get the designation, but the early job growth results were inconclusive.

Why This Matters
Before this paper, researchers had to invent their own, often inconsistent, ways to handle these 2D boundaries. Some would just ignore one of the scores; others would use messy approximations.

The rd2d package provides a standardized, rigorous toolkit. It allows researchers to:

  1. Map out the exact "Boundary Average Treatment Effect" (BATEC)—essentially, a map showing where the policy works and where it doesn't.
  2. Summarize that map into a single number (the average effect) or find the "best case" scenario (the largest effect).
  3. Do all this with mathematically proven confidence intervals, so we know if the results are real or just luck.

In a Nutshell
This paper introduces a new, versatile tool for measuring cause-and-effect when the rules for getting a treatment depend on two factors at once. It offers two ways to look at the data (direct 2D mapping or simplified 1D distance), provides automatic tools to handle the math, and was successfully tested on Opportunity Zones, revealing that while the zones were easy to get, their early impact on jobs was hard to prove.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →