Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Csdid Front End via event_study() #690

Open
s3alfisc opened this issue Nov 1, 2024 · 6 comments
Open

Csdid Front End via event_study() #690

s3alfisc opened this issue Nov 1, 2024 · 6 comments

Comments

@s3alfisc
Copy link
Member

s3alfisc commented Nov 1, 2024

PyFixest supports a unified front end for three did estimators - twfe, did2s, and linear projections. It would be cool to allow for other estimators, potentially implemented in outside/ standalone packages.

For example, csdid by @alexanderquispe implements the C&S estimator and looks high quality.

We could add csdid as an optional dependency and allow users to call it via the event_study frontend.

@alexanderquispe what would you think about this?

Also @rafimikail fyi

@Jayhyung
Copy link
Member

Hi @s3alfisc! I personally want to tackle this issue as I've been through Callaway and Sant’Anna 2021 and their package. Did anyone pick this up already(I'm okay to pick other issues If @rafimikail already took this)? Just for the record, are we adding this csdid package as a dependency for pyfixest? Thanks always!

@s3alfisc
Copy link
Member Author

s3alfisc commented Nov 18, 2024

Hi @Jayhyung, @rafimikail hasn't started on this, so I would happily assign it to you =) The idea was to add csdid as an optional runtime dependency so that users do not have to install the package if they don't need it. As a mid-term goal, I was thinking of moving the did module out of pyfixest into a standalone package that functions as a wrapper / API to multiple did implementations. The counterargument against doing all of this is that we are risking pyfixest to get quite bloated. Not sure what is best. Maybe you have any thoughts on this @Jayhyung?

@Jayhyung
Copy link
Member

Jayhyung commented Nov 20, 2024

My guess is that it would be certainly better to spin off did part as a different package, as users who are interested in did module will be the different group of the users. Also with the current pyfixest, we cannot implement CS estimator, as this estimator requires covariate adjustment step using IPW or DR for estimating each group-time ATT, so we also need separate methods(maybe a package or module for this?) for doing this step. Actually csdid package imports drdid to do this. I guess embedding IPW or DR to the current pyfixest codebase will be a bit weird ;). This will be my first time making a standalone package, so let me check on this and study further. So please assign this issue to me and I will bring a bit more concrete plan before I start coding. Thanks!

@bernardodionisi
Copy link

bernardodionisi commented Nov 20, 2024

Or just use differences, which is a fast, scalable, and feature-rich implementation of the various estimation methods discussed in Callaway and Sant'Anna and other papers with that flavor.

By the way, I am also happy to add other methods to differences if you guys are interested in working toward that goal!

@Jayhyung
Copy link
Member

Hi @bernardodionisi ! This is a great package! I will look into this. Thanks!

@s3alfisc
Copy link
Member Author

By the way, I am also happy to add other methods to differences if you guys are interested in working toward that goal!

Yep, building around differences might also be a good option! We should definitely discuss this =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants