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

DiD: allow multiple pre/post intervention observations + correctness fixes #140

Merged
merged 7 commits into from
Dec 26, 2022

Conversation

drbenvincent
Copy link
Collaborator

Closes #76

  • Main new feature is ability to run DiD with multiple pre and post treatment observations.
  • This is covered in tests with test_did_banks_simple and test_did_banks_multi
  • DiD was in a pretty bad state to be honest. This is now much more cleaned up and improved. So it should be much more correct now. It can be improved even further (specifically with custom priors) when we have Bambi models available.
  • Previously we had a treated predictor. This was equivalent to the group:post_treatment interaction multiplication. But we've done away with this and have replaced treated with post_treatment which is is 1 in all post treatment time points. This allows the model formula to mirror the DiD equations more closely, and makes things more explicit.
  • The plotting is not yet perfect, but it improved, and semi-robust to the single and multiple pre/post treatment observation cases.

There are clearly more ways in which DiD and the examples can be improved, but I think this PR represents a very good step forward that's worth merging at this point.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@drbenvincent drbenvincent merged commit 5aead6b into main Dec 26, 2022
@drbenvincent drbenvincent deleted the did_multiple_observations branch December 26, 2022 17:09
@drbenvincent drbenvincent changed the title Did multiple observations DiD: allow multiple pre/post intervention observations + correctness fixes Dec 26, 2022
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

Successfully merging this pull request may close these issues.

DiD: allow for multiple pre and post intervention observations
1 participant