R

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.

What Does TWFE Actually Do? Manual Demeaning and the FWL Theorem

What does a regression that adjusts for country and year differences actually do to the data? Using simulated data for 150 countries in R, we show step by step that it equals subtracting country and year averages before a simple regression, and why the usual margins of error then need a fix. It comes with an interactive app that runs in your web browser.

Dynamic Panel BMA: Which Factors Truly Drive Economic Growth?

Which factors truly drive economic growth, such as investment, education or trade? Using 73 countries over four decades, we average across every possible combination of factors instead of betting on a single model, while allowing growth itself to shape those factors. This R tutorial comes with an interactive app that runs in your web browser.

Spatial Dynamic Panel Data Modeling in R: Cigarette Demand Across US States

When a state raises cigarette prices, do smokers simply buy in the state next door? Using cigarette demand in 46 American states from 1963 to 1992, we measure how prices and income affect smoking at home and in neighboring states, and how habits carry over from year to year. This R tutorial 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.

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.

Three Methods for Robust Variable Selection: BMA, LASSO, and WALS

When many factors could explain carbon emissions, which ones truly matter? Using simulated data for 120 fictional countries where the right answer is known, this R tutorial compares three methods for choosing which factors to keep and shows that factors flagged by all three are the safest bets. It comes with an interactive app that runs in your web browser.

Heterogeneous treatment effects via two-stage DID

An introduction to heterogeneous treatment effects using the two-stage DID estimator of Gardner (2021)

Convergence clubs

The book provides a succinct review of the recent club convergence literature, a comparative view of developed and developing countries, and a tutorial on how to implement the club convergence framework in Stata and R.

Staggered DiD (Ex1)

An introduction to difference in differences with multiple time periods and staggered treatment adoption.