causal inference

Conditional Average Treatment Effects (CATE) with Stata 19

Does access to a workplace retirement savings plan help some households build more wealth than others? Instead of reporting one average effect, we use machine learning in Stata to estimate how the effect differs across households by income and other traits. The tutorial comes with an interactive app that runs in your web browser.

Treatment Effects in Stata: A Beginner's Tour of Six Estimators with the Maternal Smoking and Birth Weight Case Study

Does smoking during pregnancy lower the birth weight of babies? Using data on about 4,600 births in Stata, we compare six ways of making smokers and nonsmokers comparable, and most of them agree on a harm of roughly 230 grams. It comes with an interactive app that runs in your web browser.

Basic Synthetic Control with R: The Basque Country Case Study

What did years of terrorist violence cost the economy of the Basque Country in Spain? This beginner R tutorial builds a look-alike Basque Country from other Spanish regions, mostly Catalonia and Madrid, and finds income per person roughly 8 percent lower at the widest point of the gap. It comes with an interactive app that runs in your web browser.

Dynamic Panel Data with Arellano-Bond GMM in Stata: The Effect of War on Economic Growth

How much does war lower the living standards of a country? Using data on 160 countries from 1955 to 2015 in Stata, we follow each country over time to separate the damage of war from lasting national differences, and find that about half of the long-run cost works through weaker institutions. The tutorial includes an interactive app that runs in your web browser.

IV Estimation with Panel Data: Economic Shocks and Civil Conflict

Does an economic downturn make civil conflict more likely? Using yearly data on more than 5,000 African regions in Stata, we treat rainfall shocks as a natural experiment for local economic activity, measured by night lights seen from space, and find that economic decline raises the risk of conflict. It comes with an interactive app that runs in your web browser.

The Synthetic Control Method in Stata: Did Proposition 99 Cut Smoking in California?

Did the 1988 tobacco tax and anti-smoking campaign in California cut cigarette sales? In Stata, we use the synthetic control method, which builds a look-alike California from a mix of other states, and find that sales fell by about 19 packs per person per year. It comes with an interactive app that runs in your web browser.

Regression Discontinuity Design (RDD) in Stata: Evaluating a Tutoring Program

Does extra tutoring raise final exam scores? In Stata, we compare students who scored just below and just above the cutoff of 70 on an entrance exam that decided who got tutoring, and find gains of about 9 to 11 points. It comes with an interactive app that runs in your web browser.

Visualizing Regression with the FWL Theorem in R

What does it really mean to control for a variable in a regression? We use a classic result from statistics to turn that idea into simple scatter plots, first with simulated data and then with real data that follows the same people over time. This R tutorial comes with an interactive app that runs in your web browser.

Visualizing Regression with the FWL Theorem in Stata

What does it really mean to control for a variable in a regression? In Stata, we turn that idea into a picture: we strip out the influence of other factors and plot what is left, using examples on store sales, airline flights and worker wages. It comes with an interactive app that runs in your web browser.

Difference-in-Differences for Policy Evaluation: A Tutorial using R

Did raising the minimum wage cost teenagers their jobs? Using American states that raised their wage floors at different times, we compare states before and after each increase and show why the classic shortcut can mislead when policies start on different dates. This R tutorial comes with an interactive app that runs in your web browser.