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

Python implementation of mixtape code #22

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,843 changes: 2,843 additions & 0 deletions Python/Differences_in_Differences.ipynb

Large diffs are not rendered by default.

353 changes: 353 additions & 0 deletions Python/Directed_Acyclical_Graphs.ipynb

Large diffs are not rendered by default.

959 changes: 959 additions & 0 deletions Python/Instrumental_Variables.ipynb

Large diffs are not rendered by default.

557 changes: 557 additions & 0 deletions Python/Matching_and_Subclassification.ipynb

Large diffs are not rendered by default.

2,603 changes: 2,603 additions & 0 deletions Python/Panel_Data.ipynb

Large diffs are not rendered by default.

493 changes: 493 additions & 0 deletions Python/Potential_Outcomes.ipynb

Large diffs are not rendered by default.

1,116 changes: 1,116 additions & 0 deletions Python/Probability_and_Regression.ipynb

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Notes on Python Implementation

Code outputs have been verified and match R output except in the following cases:

- **Differences_in_Differences.ipynb:** The design matrix in the Cunningham and Cornwell (2013) example is rank deficient. lm and lm_robust have a convergence issues. The problem seems to be with the fip variable. The statsmodels algorithm is more robust to rank deficiency resulting is different results
- **Matching_and_Subclassification.ipynb:** Python does not have an implementation of nearest neighbor matching in python. I may be possible to recreate one use standard KNN tools
- **Regression_Discontinuity.ipynb:** The smoothing and density section is missing

The majority of the models use the statmodels package. While I tried to limit my usage of R code through rpy2 I use it once for synthetic control matching.
927 changes: 927 additions & 0 deletions Python/Regression_Discontinuity.ipynb

Large diffs are not rendered by default.

356 changes: 356 additions & 0 deletions Python/Synthetic_Control.ipynb

Large diffs are not rendered by default.