Scott's Mixtape Substack

Scott's Mixtape Substack

Diff-in-Diff, population weights and parallel trends (with code): part 2

scott cunningham's avatar
scott cunningham
Sep 18, 2025
∙ Paid
5
2
Share

Today I’m going to share a simulation I’ve been working on to illustrate something I wrote about yesterday. The short version of what I said was almost like a series of simple deductions, one after another, which started once I realized what population weighting does and does not do. Today I’m going to review that insight that I had written about, but I’m also going to introduce code so that you too can play around with this result and see for yourself that depending on the selection mechanism, parallel trends may not hold for both the weighted and unweighted case, and as a consequence it may not be possible to identify both the weighted and unweighted ATT target parameters using the same diff-in-diff design. It’s not probably accurate to call it an impossibility result, because it is indeed possible, but the conditions do place restrictions on the type of selection into treatment.

But first, let’s consult the magic 8-ball to see if I will be paywalling this post. As you recall, I randomize the paywall as I struggle as a rule with paywalling more generally — evidenced by around 6 months now of posting all my content without any paywall. So we go to my python script, we flip a coin three times, and if it’s heads 2+ times, I paywall, and if it isn’t, I don’t. And today it was, like yesterday, heads two out of three which means paywall!

Thank you all for supporting the substack. It’s reader supported, I’m trying to get back to more regular posts about econometrics, and will be randomly paywalling again as before. I appreciate all your support (both subscribers and not), and hope that this post is insightful and interesting. Though Alfred Adler would say that your feelings and thoughts are your life task, and not mine, so maybe I just offer this up as a gift and you can do with it what you want.

Scott's Mixtape Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

Keep reading with a 7-day free trial

Subscribe to Scott's Mixtape Substack to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 scott cunningham
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture