vincentarelbundock / marginaleffects

R package to compute and plot predictions, slopes, marginal means, and comparisons (contrasts, risk ratios, odds, etc.) for over 100 classes of statistical and ML models. Conduct linear and non-linear hypothesis tests, or equivalence tests. Calculate uncertainty estimates using the delta method, bootstrapping, or simulation-based inference
https://marginaleffects.com
Other
426 stars 45 forks source link

Support: `glinternet` #934

Closed connorjmccabe closed 10 months ago

connorjmccabe commented 10 months ago

Hello,

I would like to request compatibility of marginaleffects with the glinternet package (group-lasso interaction networks):

https://cran.r-project.org/web/packages/glinternet/index.html

I am able to use the predict() function successfully with glinternet output but it will not translate to marginaleffects. If this is at all possible that would be great.

Connor

vincentarelbundock commented 10 months ago

Thanks for the suggestion!

Does it have a formula interface or does it only accept matrices as input? From the docs, it looks like the latter, in which case direct support won't be possible.

If that's the case, then it might still be possible to use via tidymodels, which offers a formula interface to glmnet and other similar models.

See the machine learning vignette (and use the dev version of marginaleffects)

vincentarelbundock commented 10 months ago

closing this because I don't see anything actionable, but feel free to keep the discussion going if you have new insights/proposals.