causal inference

Introduction to the Synthetic Control Method in Python with mlsynth

How much did Proposition 99, the 1989 California tobacco program, reduce cigarette sales? This beginner Python tutorial teaches the synthetic control method, which builds a look-alike California from other states, finds about 19 fewer packs sold per person each year, and then tries hard to break that result. It comes with an interactive app that runs in your web browser.

The FWL Theorem: Making Multivariate Regressions Intuitive

What does it really mean to control for another factor in a regression? This Python tutorial uses a simulated fast food coupon campaign to show that any such result can be rebuilt by first removing what the other factors explain and then plotting what is left in a simple two-variable chart. It comes with an interactive app that runs in your web browser.

Evaluating the Impact of Infrastructure: A Beginner's Guide to Difference-in-Differences with the Jamuna Bridge

When a major bridge connected millions of people in northwest Bangladesh to the capital in 1998, did the region's economy take off? This beginner-friendly Python tutorial uses satellite images of nighttime lights to compare the connected region with a similar one that stayed isolated, before and after the bridge opened.

Bayesian Spatial Synthetic Control in Python: California's Proposition 99 with scspill and mlsynth

Did the 1988 California tobacco law cut cigarette sales, and did it also affect neighboring states such as Nevada? This Python tutorial builds a look-alike California from other states in three steps, the last one letting nearby states be affected too, and finds that the drop in California holds up. It comes with an interactive app that runs in your web browser.

The Synthetic Control Ladder in Python: A Guided Tour of mlsynth on the Brexit Referendum

How much did the 2016 Brexit vote cost the British economy? This Python tutorial builds a look-alike United Kingdom from other wealthy economies with six related methods, finds output about 3 percent lower by the end of 2018, and shows how default settings can quietly change the answer. It comes with an interactive app that runs in your web browser.

From DiD to SDID: A Ladder of Synthetic Control Estimators, and What Brexit Cost the UK

How much did the 2016 Brexit vote cost the economy of the United Kingdom? We build a look-alike United Kingdom from other rich countries, step by step through a ladder of increasingly flexible methods, and compare what each step says. This R tutorial includes cheat sheets for Stata and Python and an interactive app that runs in your web browser.

Covariates in Difference-in-Differences: The LaLonde Test in Python

Can we still find the true effect of a job training program on earnings if we compare trainees with ordinary survey respondents instead of a randomized control group? This Python tutorial shows that adding background characteristics fixes the estimate only when they adjust the expected earnings trend of the comparison group. It comes with an interactive app that runs in your web browser.

The Augmented Synthetic Control Method: A Beginner's Tutorial with the Kansas Tax Cuts

Did the large 2012 Kansas tax cut boost the state economy, or shrink it? This beginner R tutorial builds a look-alike Kansas from other states, then corrects the remaining mismatch, and finds output per person roughly 3 to 4 percent lower, although chance cannot be fully ruled out. It comes with an interactive app that runs in your web browser.

Staggered Synthetic Difference-in-Differences (SDID) in Stata: Gender Quotas and Women in Parliament

Do gender quotas raise the share of women in national parliaments? In Stata, we compare 9 countries that adopted quotas in different years with look-alike groups built from 110 countries without quotas, and find an average gain of about 8 percentage points that varies a lot across countries. The tutorial includes an interactive app that runs in your web browser.

Synthetic Difference-in-Differences (SDID) in Stata: Re-evaluating California's Proposition 99

Did the 1988 tobacco tax in California reduce smoking? In Stata, we compare three ways of building a comparison for California from other states, including a newer method that blends their strengths, and all three agree that cigarette sales fell, though by different amounts. It comes with an interactive app that runs in your web browser.