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

Conversation

tomcaputo
Copy link

@tomcaputo tomcaputo commented Mar 7, 2021

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 in the synthetic control matching

@kylebutts
Copy link
Collaborator

Hi Tom, this is really great! I'm sure there are some python folks who will really appreciate this!

I've moved all of these notebooks into https://github.com/scunning1975/mixtape_learnr/ as it more naturally matches the .Rmd notebooks there. I'm adding the resources to https://mixtape.scunning.com/teaching-resources.html with a big thank you to you. I'm going to close this pull request as I put your work

@kylebutts kylebutts closed this Mar 11, 2021
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.

2 participants