Regression discontinuity and synthetic control

Today let's understand two designs that estimate a causal effect without randomizing anyone into a treatment group.

Rosewood Market, a small grocery chain, gives a $10 welcome credit to any shopper whose first-visit spend is $50 or more. Rosewood never flipped a coin to decide who got the credit. It handed it out by a rule. And yet Rosewood can still work out what that credit is worth, because the rule itself builds the comparison: a shopper who spent $49 and a shopper who spent $51 are alike in almost every way, except that one of them got the credit and the other did not.

Across town, Rosewood's Elm Street store switched its checkout lanes to self-checkout. There is only one Elm Street, so there is no twin store sitting untouched for comparison. But Rosewood runs four other stores, each on its own trend of weekly sales, and a careful blend of those four tracks Elm Street's sales closely enough, before the switch, to stand in for what Elm Street would have sold without it.

Both situations share the same shape. Something other than a coin flip decided who was treated, and the data itself, a cutoff rule in one case and a panel of untreated stores in the other, supplies the comparison a randomized experiment would otherwise have given you.

Here is what each design builds and what it ultimately hands you.

The left column is what each design needs before you can use it at all. The right column is the one number the whole lesson is building toward, twice over.

A cutoff that assigns the credit: the running variable

Let's start with Rosewood's credit, since it is the simpler of the two designs.

The variable that decides who crosses into treatment is called the running variable. Here it is first-visit spend. The point where treatment switches on is the cutoff, which for Rosewood is $50. Spend $50 or more on your first visit and you get the $10 credit automatically; spend less and you do not. Nobody applies for it and nobody is refused it. The rule alone decides, which makes this a sharp design: there are no exceptions on either side of the cutoff.

That rule is also what makes the comparison fair right at the boundary. A shopper who spent $49 and a shopper who spent $51 shop at the same stores, in the same week, with first-visit habits that are nearly identical. The only real difference between them is the credit. Compare a $10 shopper against a $90 shopper instead, and the gap is no longer just the credit. Those two differ in income, in how often they shop, in what they buy, in nearly everything that first-visit spend tends to track.

So let's build the data and see that comparison for real. Rosewood tracks 400 shoppers, each with their first-visit spend and whether they crossed the $50 line, and then their spend on a second visit. The second-visit spend is built from three pieces: a base amount, a small rise that tracks how much a shopper spent the first time, and a flat $6 bump for shoppers who got the credit, plus ordinary noise. That $6 is the real effect the jump at the cutoff needs to recover, underneath whatever the naive comparison says.

RInteractive R
# Simulate 400 shoppers and compare second-visit spend with and without the $10 credit set.seed(11) n <- 400 first_visit_spend <- round(runif(n, 0, 100), 2) grant <- as.integer(first_visit_spend >= 50) second_visit_spend <- round(10 + 0.15 * first_visit_spend + 6 * grant + rnorm(n, 0, 6), 2) shops <- data.frame(first_visit_spend, grant, second_visit_spend) naive_diff <- mean(shops$second_visit_spend[shops$grant == 1]) - mean(shops$second_visit_spend[shops$grant == 0]) round(naive_diff, 2) #> [1] 12.4

  

The naive comparison, just the average second-visit spend of credited shoppers minus everyone else, comes out to 12.4. That is more than double the true $6 effect built into the data. The reason is the 0.15 slope: credited shoppers spent $50 or more on their first visit by definition, so on average they already spent a lot more than non-credited shoppers did. That extra first-visit spend carries forward into a higher second-visit spend on its own, with nothing to do with the credit. The naive gap bundles that trend together with the real $6 effect, and the trend is doing most of the work.