gtsummary::theme_gtsummary_compact()
df_paper_01 %>%
filter(!is.na(who_risk_cat_2)) %>%
gtsummary::tbl_summary(
include = c(a_agebase, a_gender, educ, income, a_domicile, maristat,
dm, hyperlipidemia, active_work_hrs, active_leisure_hrs, bmi,
ee_sbp_0, ee_dbp_0, ee_waistc_0, waist_hip_ratio, tobacco_use,
ff_fbs_0, ff_hba1c_0,egfr_cat, ff_creat_0, ff_totchol_0,
ff_trigly_0, ff_hdl_0, ff_ldl_0, d_st_type, ranking, barthels_index,
nihss_scale, who_risk_cat_2),
by = who_risk_cat_2,
statistic = list(
gtsummary::all_continuous()~"{mean} ({sd})",
gtsummary::all_categorical()~"{n} ({p})"),
missing = "no",
digits = gtsummary::all_categorical()~c(0, 1),
type = list(ranking ~ "continuous")
) %>%
gtsummary::add_p(
pvalue_fun = ~ gtsummary::style_pvalue(.x, digits = 3),
test = list(
a_agebase ~ "clmft",
a_gender ~ "chsqft",
educ ~ "chsqft",
income ~ "chsqft",
a_domicile ~ "chsqft",
maristat ~ "chsqft",
dm ~ "chsqft",
hyperlipidemia ~ "chsqft",
active_work_hrs ~ "clmft",
active_leisure_hrs ~ "clmft",
bmi ~ "clmft",
ee_sbp_0 ~ "clmft",
ee_dbp_0 ~ "clmft",
ee_waistc_0 ~ "clmft",
waist_hip_ratio ~ "clmft",
tobacco_use ~ "chsqft",
ff_fbs_0 ~ "clmft",
ff_hba1c_0 ~ "clmft",
egfr_cat ~ "chsqft",
ff_creat_0 ~ "clmft",
ff_totchol_0 ~ "clmft",
ff_hdl_0 ~ "clmft",
ff_ldl_0 ~ "clmft",
d_st_type ~ "chsqft",
ranking ~ "clmft" ,
barthels_index ~ "clmft",
nihss_scale ~ "clmft")
)%>%
gtsummary::bold_labels() %>%
gtsummary::modify_spanning_header(
gtsummary::all_stat_cols()~"**WHO CVD Risk Category**") %>%
gtsummary::bold_p() %>%
gtsummary::modify_caption(
"Table 1: Relationship betweem WHO CVD risk factors and Clinico-demographics factors"
)