gtsummary icon indicating copy to clipboard operation
gtsummary copied to clipboard

Feature request: Support for multi-components models

Open larmarange opened this issue 2 years ago • 2 comments
trafficstars

Dear @ddsjoberg

I'm currently adding support for zero-inflated models in broom.helpers, cf. https://github.com/larmarange/broom.helpers/pull/233

With such models, you end-up with two sets of coefficients, for the two components of the model (see component column in the tidy table).

The situation is quite similar with multinomial models and their "y.level" column. Could we add support in tbl_regression() using the code already written for multinomial models?

Best regards

larmarange avatar Aug 04 '23 12:08 larmarange

Absolutely! 🚀 🚀 🚀

ddsjoberg avatar Aug 04 '23 17:08 ddsjoberg

betarag models are also multicomponent models. Therefore, we should be more general.

More precisely, we should check (1) if there is a "component" column in the result returned by tidy_plus_plus(), (2) if there is at least two different values in this col (with the selection of certain variables, removal of intercepts, etc. we could end up with just one value). If this is the case, then the tbl should be presented in a similar way as multinomial models.

larmarange avatar Aug 05 '23 09:08 larmarange