bashtage / linearmodels

Additional linear models including instrumental variable and panel data models that are missing from statsmodels.
https://bashtage.github.io/linearmodels/
University of Illinois/NCSA Open Source License
930 stars 184 forks source link

Support for Difference-in-Difference/Synthetic Control/RD Methods #419

Open amichuda opened 2 years ago

amichuda commented 2 years ago

Not sure if this falls in line with where you want this package to go, but given the recent slew of papers in the diff-in-diff literature, I was wondering if adding support for diff-in-diff directly (as well as the various ways of estimating treatment effects), could be a cool enhancement. But not if you think of diff-in-diff as a standalone method on the same level as a panel regression or whether diff-in-diff is "a method implemented using panel regression."

The same goes for synthetic control and RD. Would be happy to send a pull request for basic support.

Assuming, you're interested, one thing that might be needed would be helper functions to get the data into the right form needed for diff-in-diff/event study/ RD?

bashtage commented 2 years ago

I think these would be a great fit since they are (nearly) linear models. Happy to review/accept PRs.