pzivich / Python-for-Epidemiologists

Tutorial in Python targeted at Epidemiologists. Will discuss the basics of analysis in Python 3
160 stars 38 forks source link

Cochran-Mantel-Haenszel #6

Closed opioiddatalab closed 4 years ago

opioiddatalab commented 4 years ago

Thank you @pzivich for this amazing resource. Having the Hernan/Robbins causal model code in python is super helpful... g-estimation!

I have a request... do you have a Cochran-Mantel-Haenszel script? If you get the chance, please, it would be useful to us to have in this repo. Thank you in advance!

pzivich commented 4 years ago

I don't have any scripts that run a Cochran-Mantel-Haenszel test currently. However, it looks like statsmodels has a class that implements it https://www.statsmodels.org/dev/generated/statsmodels.stats.contingency_tables.StratifiedTable.html

opioiddatalab commented 4 years ago

Thanks! That should do nicely. Much appreciated.