econometrics

Introduction to Panel Data Methods in Python

Does joining a union raise wages? Following the same workers over two years in Python, we compare seven ways to analyze repeated data and see that the estimated wage gain nearly triples once each worker is compared with the same worker at another time. It comes with an interactive app that runs in your web browser.

Regional Inequality from Outer Space: Predicting GDP from Nighttime Lights and Building Inequality Indices in Python

Learn how to turn satellite images of nighttime lights into estimates of regional income, then measure how unequal regions are within each country. Step by step in Python, we test whether regional inequality first rises and then falls as countries develop.

Spatial Inequality and the Kuznets Curve: Parametric and Semiparametric Estimates in R

Do gaps between rich and poor regions within a country first widen and then narrow as the country develops? Using simulated data for 56 countries that mirrors a published study, we measure regional inequality and trace how it rises and falls with income, from simple to more flexible methods. This R tutorial comes with an interactive app that runs in your web browser.

Dynamic Panel Data Models in Python: From Nickell Bias to System GMM

When a firm gains or loses workers this year, how much of that change is still there next year? This Python tutorial uses data on 140 British firms to show why simple estimates of this persistence mislead and how more careful methods and checks reach a reliable answer. It comes with an interactive app that runs in your web browser.

Double LASSO in Python: Does Abortion Reduce Crime?

Python companion to the R and Stata Double LASSO tutorials — same data, same five estimators, plus a hands-on introduction to the DoubleML library (DoubleMLPLR, DoubleMLIRM, and learner-robustness across LASSO, RandomForest, XGBoost).

Double LASSO in Stata: Does Abortion Reduce Crime?

Stata companion to the R Double LASSO tutorial — same data, same five estimators, replicating the Belloni-Chernozhukov-Hansen 284-control extension of Donohue and Levitt's abortion-and-crime panel with pdslasso, rlasso, and cvlasso.

Double LASSO for Causal Inference: Does Abortion Reduce Crime?

Did legal abortion lower crime in the United States, as a famous 2001 study claimed? Instead of hand-picking a few control variables, we let a data-driven method choose among 284 candidates and check whether the original finding holds up. This R tutorial comes with an interactive app that runs in your web browser.

Regional Inequality and the Kuznets Curve: Panel Fixed Effects in Python

As countries grow richer, do the gaps between their regions first widen and then narrow, or do they widen again at the top? This Python tutorial uses satellite images of night lights for about 180 countries and compares each country with itself over time, finding an N-shaped pattern. It comes with an interactive app that runs in your web browser.

Identifying Latent Group Structures in Panel Data: The classifylasso Command in Stata

Do all countries respond the same way to democracy or inflation? In Stata, we use a method that sorts countries into hidden groups that behave alike, and find that the average link between democracy and economic growth hides a strong positive effect in 57 countries and a negative one in 41. 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.