-
Notifications
You must be signed in to change notification settings - Fork 14
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
Swapping tab_* for {gtsummary} #260
Comments
I fully support this idea. I don't know if it would necessarily lighten epibuffet since much of the weight is coming from {surveyr}, but I like the approach of {gt} and {gtsummary} and think that it has had a lot more thought an effort put into it than {epibuffet}. |
also has functions for survey weighted tables |
I am 100% for this (assuming it works for our use-cases). We may even consider just making {gtsummary} a backend for {epibuffet} |
turns out is possible to replicate the results of our tab_univariate (example below) - so actually the only wrapper that needs writing is to produce stratified estimates (mantel haenszel) output <- linelist %>%
select(died_covid, gender, age_group) %>% # keep variables of interest
tbl_uvregression( ## produce univariate table
method = glm, ## define regression want to run (generalised linear model)
y = died_covid, ## define outcome variable
method.args = list(family = binomial), ## define what type of glm want to run (logistic)
exponentiate = TRUE, ## exponentiate to produce odds ratios (rather than log odds)
hide_n = TRUE ## dont include overall counts in regression table
)
## produce counts for each of the variables of interest
cross_tab <- output$inputs$data %>%
tbl_summary(by = died_covid)
## combine for a full table
tbl_merge(list(cross_tab, output)) |
in progress for surveys in #275 |
May be worth considering to use {gtsummary } for descriptive tables.
Would mean swapping to {flextable } rather than kable. Which would also play nicely if we swapped to officedown as in #188
Would then mean that we could retire tab_linelist and would significantly lighten {epibuffet}.
Thoughts @zkamvar @pbkeating ?
The text was updated successfully, but these errors were encountered: