marginaleffects for statsmodels

142 views
Skip to first unread message

VincentAB

unread,
Jul 2, 2023, 6:56:38 PM7/2/23
to pystatsmodels
Hi all,

I just published a Python version of `marginaleffects` to Github: https://github.com/vincentarelbundock/pymarginaleffects

It is a collection of helper functions to easily compute many quantities of interest based on `statsmodels` objects:

  • Predictions
  • Slopes (and elasticities)
  • Comparisons: contrasts, differences, risk ratios, lift, odds, etc.
  • Different effects sizes, ex: the effect of a change of 1 standard deviation on the predicted outcome.
  • Delta method standard errors.
  • Linear and non-linear hypothesis tests on coefficients, slopes, contrasts, or predictions.
  • Equivalence tests

This is still at the dangerous "alpha" release; there are many rough edges, and some numeric results still look fishy to me. But it is far enough as a proof of concept that I thought I'd seek some feedback and bug reports from the community.

Note that this is an incomplete port of my `marginaleffects` package for R. You can learn more about it on this website, which includes 25+ chapters of tutorials and case studies: https://vincentarelbundock.github.io/marginaleffects

If you have time to check it out, let me know what you think!

Best,

Vincent

Chad Fulton

unread,
Jul 2, 2023, 9:06:39 PM7/2/23
to pystat...@googlegroups.com
This looks very cool Vincent, thanks for taking the time to start porting some of your great marginaleffects package into Python!

Chad

--
You received this message because you are subscribed to the Google Groups "pystatsmodels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystatsmodel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pystatsmodels/3a297bbd-dd31-4506-bda5-0de3cf1a670fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages