MSKCC-Epi-Bio / bstfun

Miscellaneous collection of functions
http://mskcc-epi-bio.github.io/bstfun
Other
34 stars 23 forks source link

Likert #54

Closed ddsjoberg closed 2 years ago

ddsjoberg commented 2 years ago

closes #53

larmarange commented 2 years ago

Thanks @ddsjoberg for the proposal.

Some thoughts about potential functionalities for discussion.

larmarange commented 2 years ago

Can we also think about a group option (for example group = "sex") to compute the likert table by sub-group and then to stack them?

larmarange commented 2 years ago

add_overall() for displaying a total 100% column?

larmarange commented 2 years ago

Would it be difficult to have an option or a method to order the table based on mean score?

larmarange commented 2 years ago

Should we fix missing = "no" when calling tbl_summary() and display the number of missing through a method add_missing() ?

ddsjoberg commented 2 years ago

Should we fix missing = "no" when calling tbl_summary() and display the number of missing through a method add_missing() ?

We could add it, but the "variable" being summarized in "...all_true...", which has no missing values. The missing values are auto-dropped because it's the by= variable.

Would it be difficult to have an option or a method to order the table based on mean score?

That shouldn't be too bad!

add_overall() for displaying a total 100% column?

I am not sure I know what you have in mind here.

A method add_score() to present some summary statistic by considering the variables as continuous.

This can be added. But perhaps not a priority, as a user can easily create the continuous summary then merge it with the likert table.

Can we also think about a group option (for example group = "sex") to compute the likert table by sub-group and then to stack them?

This wouldn't be difficult to implement with tbl_strata(). I would imagine users would want to control whether the tbls are stacked or merged. It can be added, but i'll prioritize the other items first....need to think about best implementation.