Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tidy_add_coefficients_type() for binomial model with log link #101

Closed
larmarange opened this issue Feb 17, 2021 · 2 comments · Fixed by #103
Closed

update tidy_add_coefficients_type() for binomial model with log link #101

larmarange opened this issue Feb 17, 2021 · 2 comments · Fixed by #103

Comments

@larmarange
Copy link
Owner

@ddsjoberg

Following ddsjoberg/gtsummary#788 we could consider to update tidy_add_coefficients_type() to take into account binomial models with log link.

Such models produce Relative Risks (RR) or Prevalence Ratios (PR) estimates.

A possibility would be to have a new coefficient type "prevalence_ratio" (with the associated coefficient_label "PR" or "log(PR)"?

Or would you prefer "relative_risk" / "RR" or "log(RR)"

Would it be problematic on gtsummary side? maybe just a litte update to deal with acronym def?

@ddsjoberg
Copy link
Collaborator

Adding the acronym would be great. I prefer relative risk as the default I'd you're ok with that!

@larmarange
Copy link
Owner Author

larmarange commented Feb 18, 2021

@ddsjoberg It works OK with gtsummary. Just no acronym definition in footnote (that part is managed by gtsummary directly)

library(broom.helpers)
library(gtsummary)
#> 
#> Attachement du package : 'gtsummary'
#> The following objects are masked from 'package:broom.helpers':
#> 
#>     all_continuous, all_contrasts
mod <- glm(response ~ age + grade * trt, gtsummary::trial, family = binomial(log))
mod %>% tbl_regression(exponentiate = TRUE) 
#> Warning: The `.dots` argument of `group_by()` is deprecated as of dplyr 1.0.0.

image

image

Created on 2021-02-18 by the reprex package (v1.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants