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
392 stars 43 forks source link

Support: `glmtoolbox::glmgee` #1148

Open adrianolszewski opened 1 week ago

adrianolszewski commented 1 week ago

Dear @vincentarelbundock,

Would you, please, consider adding the glmtoolbox package (mostly the glmgee() function; but adding others would be great too!) to marginaleffects?

This package provides the predict() functions for all supported models: (weighted) GEE, GNM, GLM, and 0-inflated models.

A few words on "why"? In my opinion, the glmtoolbox makes a new solid standard for GEE estimation in R. This package offers reliable estimation and lots of tools absent in other packages. The current geepack package seems really abandoned. Not much happens there, old (2-3 year-old) issues remain unclosed, serious bugs are unfixed, the routine often crashes for unstructured covariance, which is a big problem. And conversely, sometimes the system is completely singular, while this one ignores it and fits instead of warning. I know geepack a very popular package and historically among the very first implementations (right after "gee"), but nowadays there are new, reliable implementations with great additions. glmtoolbox is one of them. I am using it at work and wouldn't replace it by anything else, finally not afraid of crashing my session. It's gaining popularity and is now officially supported also by the emmeans, insights and parameters packages.

obraz

vincentarelbundock commented 1 week ago

Thanks for the suggestion. I am very interested in adding support for this, and I will certainly take a look at it. That said, I don't want to make false promises. My day job is crazy these days, so I may not have time to get to this in the near term.

In the meantime, if anyone is interested in giving it a shot, here's a tutorial on how to add models:

https://marginaleffects.com/vignettes/extensions.html