The gtsummary::tbl_summary functionality is wonderful and I am looking for a way to add SMD for categorical variables. The tableone function provided smd for all types of covariates including character. I tried adding SMD to tbl_summary by add_stat with effsize::cohen.d or effsize::cohen.d. but both worked for numeric covariates and not for character. Any guidance is appreciated. Thanks
SMD for categorical variable using tbl_summary
1.1k views Asked by Inbal Goldshtein At
1
Use the
add_difference()
function with method"smd"
to get the standardized mean differences. Review this page for a list of all available methods https://www.danieldsjoberg.com/gtsummary/reference/tests.htmlCreated on 2022-03-03 by the reprex package (v2.0.1)