pymc-labs / pymc-labs/CausalPy
Add examples for 'classic' causal inference datasets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 115
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 11
Description
Suggestion by @juanitorduz... Rather than just applying the package to synthetic datasets, it would be good to apply the methods to classic datasets / causal inference problems. This also gives people some faith that the package produces sensible (or at least similar) results as other people's implementations.
Sources
- data from the book Mastering Metrics is available here http://www.masteringmetrics.com/resources/
RDD: drinking example
See https://matheusfacure.github.io/python-causality-handbook/16-Regression-Discontinuity-Design.html#
- Frequentist model
- Bayesian model
- Add reference/details of original study
SC: Proposition 99 example
- grab data
- Frequentist model
- Bayesian model
ITS: Add simple example to match the CausalImpact docs
- Generate similar data
- Add the example to
its_pymc.ipynb - Add the example to
its_skl.ipynb
DiD: Add the 'bank failure' dataset + analyses
- add data
- add Bayesian analysis
- add case when we have multiple measurements over time (see #76)
- add Frequentist analysis
This will almost certainly require code changes. At the moment there is a hard wired constraint that there is just a single pre and post observation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing RDD and DiD analyses, the Mastering Metrics data, and the linked causal inference examples. Then inspect its_pymc.ipynb and its_skl.ipynb, along with the hard-wired single pre/post observation constraint. Done means adding the requested datasets and frequentist or Bayesian analyses, documenting the RDD study, and completing the ITS notebook examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python, scikit-learn
- Domain
- analytics, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100