Mace Paper

Author

Prof. Sarfo

Published

April 16, 2026

Housekeeping

Main data file

Show the code
rm(list = ls(all = T))
library(tidyverse)
library(gtsummary)
gtsummary::theme_gtsummary_eda()

# Read in data
df_pings2_bp <- 
    dget("Data/pings_2_data_with_bps_ready") %>%
    mutate(
        female = a_gender == "Female", 
        nihss_levcon = str_extract(z_levcon, "^\\d+") %>% 
            as.numeric(),
        nihss_loc_quest = str_extract(z_loc_quest, "^\\d+") %>% 
            as.numeric(), 
        nihss_loc_comm = str_extract(z_loc_comm, "^\\d+") %>% 
            as.numeric(),
        nihss_bestgaze = str_extract(z_bestgaze, "^\\d+") %>% 
            as.numeric(),
        nihss_vfield = str_extract(z_vfield, "^\\d+") %>% 
            as.numeric(),
        nihss_facparesis = str_extract(z_facparesis, "^\\d+") %>% 
            as.numeric(),
        nihss_motor_armr = str_extract(z_motor_armr, "^\\d+") %>% 
            as.numeric(),
        nihss_motor_arml = str_extract(z_motor_arml, "^\\d+") %>% 
            as.numeric(),
        nihss_motor_legr = str_extract(z_motor_legr, "^\\d+") %>% 
            as.numeric(),
        nihss_motor_legl = str_extract(z_motor_legl, "^\\d+") %>% 
            as.numeric(),
        nihss_limbataxia = str_extract(z_limbataxia, "^\\d+") %>% 
            as.numeric(),
        nihss_pinprick = str_extract(z_pinprick, "^\\d+") %>% 
            as.numeric(),
        nihss_bestlang = str_extract(z_bestlang, "^\\d+") %>% 
            as.numeric(),
        nihss_dysarthria = str_extract(z_dysarthria, "^\\d+") %>% 
            as.numeric(),
        nihss_extinction = str_extract(z_extinction, "^\\d+") %>% 
            as.numeric(),
        nihss_scale = nihss_levcon + nihss_loc_quest + nihss_loc_comm + 
            nihss_bestgaze + nihss_vfield + nihss_facparesis + 
            nihss_motor_armr + nihss_motor_arml + nihss_motor_legr +
            nihss_motor_legl + nihss_limbataxia + nihss_pinprick + 
            nihss_bestlang + nihss_dysarthria + nihss_extinction, 
        ranking = str_extract(x_ranking, "\\d+") %>% 
            as.numeric(), 
        dm = case_when(
            ff_hba1c_0 > 6.5 ~ "Yes",  
            c_dm == "Yes" ~ "Yes",
            h_antidm == "Yes" ~ "Yes", 
            ff_fbs_0 > 7 ~ "Yes",
            eventname == "Baseline" ~ "No"),
        hba1c_high = case_when(
            ff_hba1c_0 < 6.5 ~ "No", 
            ff_hba1c_0 >= 6.5 ~ "Yes"),
        hpt = case_when(
            sbp >= 140 ~ "Yes", 
            dbp >= 90 ~ "Yes",
            sbp <  140 ~ "No",
            dbp <  90 ~ "No") %>%  factor(),
        hyperlipidemia = case_when(
            c_hyperlip == "Yes" ~ "Yes", 
            h_antilipid == "Yes" ~ "Yes",
            ff_totchol_0 > 5.17 ~ "Yes", 
            eventname == "Baseline" ~ "No"),
        tobacco_use = case_when(g_tobacco %in% c(
            "Formerly used tobacco products", 
            "Stopped after the stroke occurred", 
            "Currently uses tobacco products") ~ "Yes",
            g_tobacco == "Never used tobacco products" ~ "No"),
        obese_overwgt = case_when(
            ee_bmi_0 >= 25 ~ "Yes", 
            ee_bmi_0 < 25 ~ "No"),
        bmi_cat = case_when(
            ee_bmi_0 < 25 ~ "Normal", 
            ee_bmi_0 < 30 ~ "Overweight", 
            ee_bmi_0 >= 30 ~ "Obese") %>% 
            factor(levels = c("Normal", "Overweight", "Obese")),
        alcohol_curr = case_when(
            g_alcohol == "Currently uses alcohol" ~ "Yes",
            g_alcohol %in% c(
                "Never used alcohol", 
                "Past 12 months", 
                "Past 30 days", 
                "Formerly used alcohol", 
                "Stopped after the stroke occured") ~ "No"),
        acei = i_acei_v2 == "Checked",
        arb = i_arb_v2 == "Checked",
        bb = i_bb_v2 == "Checked",
        ccb = i_ccb_v2 == "Checked",
        h_alpha_md = i_alpha_md_v2 == "Checked",
        h_alpha_ab = i_alpha_ab_v2 == "Checked",
        diuretics = i_diuretics_v2 == "Checked",
        h_antiplt = i_antiplt_v2 == "Yes",
        h_statins = i_statins_v2 == "Yes",
        income2 = case_when(
            a_income %in% c("0-100", "101-250", "251-500") ~ "<500 GHc",
            a_income %in% c("501-1500", "1501-3000", "> 3000") ~ 
                ">= 500 GHc"),
        educ = fct_recode(a_formeduc, Tertiary = "Postgraduate"),
        educ2 = case_when(
            a_formeduc %in% c("None", "Primary") ~ "None/Primary",
            a_formeduc %in% c("Secondary", "Tertiary", "Postgraduate") ~ 
                "Secondary or higher"),
        agecat = case_when(
            a_agebase  < 60 ~ "<60", a_agebase >= 60 ~ ">=60"),
        hosp_cat = case_when(
            datagrp %in% c("CCTH SITE", "KATH SITE", "KORLE-BU SITE") ~ 
                "Tertiary",
            datagrp %in% c(
                "KUMASI SOUTH HOSPITAL", "AGOGO SITE", "KNUST SITE") ~ 
                "Secondary",
            datagrp %in% c(
                "ANKAASE SITE", "MANHYIA GOVT HOSPITAL", "KWADASO SITE",
                "TAFO SITE") ~ 
              "Primary"), 
        arm = case_when(
            arm == "Arm 1- Intervention Arm" ~ "Intervention", 
            arm == "Arm 2- Routine Care" ~ "Routine"),
        morisky_4_item = (unclass(k_forget) + unclass(k_miss) + 
            unclass(k_fine) + unclass(k_doctor)), 
        across(
            c(l_forget, l_decide, l_salty, l_shake, l_fasfood, l_appoint, 
            l_missched, l_prescrip, l_runout, l_skipmed, l_feelbet,
            l_feelsick, l_someone, l_careless), 
            .fns = ~factor(.x),
            .names = "{.col}_unclassed"),
        across(
            c(l_forget_unclassed, l_decide_unclassed, l_salty_unclassed, 
              l_shake_unclassed, l_fasfood_unclassed, l_appoint_unclassed, 
            l_missched_unclassed, l_prescrip_unclassed, l_runout_unclassed, 
            l_skipmed_unclassed, l_feelbet_unclassed, l_feelsick_unclassed, 
            l_someone_unclassed, l_careless_unclassed), 
            .fns = ~unclass(.x)),
        hillbone = (
            l_forget_unclassed + l_decide_unclassed + l_salty_unclassed + 
            l_shake_unclassed + l_fasfood_unclassed + l_appoint_unclassed + 
            l_missched_unclassed + l_prescrip_unclassed + 
            l_runout_unclassed + l_skipmed_unclassed + l_feelbet_unclassed + 
            l_feelsick_unclassed + l_someone_unclassed + 
                l_careless_unclassed) %>%  
            as.numeric(),
        aa_bp_115_75_corrrect = ifelse(
            aa_bp_115_75 == "Normal", "Yes", "No"),
        aa_bp160_100_correct = ifelse(
            aa_bp160_100 == "High", "Yes", "No"),
        aa_hptlasts_correct = ifelse(
            aa_hptlasts == "The Rest of their Life", "Yes", "No"),
        aa_hptmeds_correct = ifelse(aa_hptmeds == "Everyday", "Yes", "No"),
        aa_losewght_correct = ifelse(aa_losewght == "Go Down", "Yes", "No"),
        aa_eatsalt_correct = ifelse(aa_eatsalt == "Go Down", "Yes", "No"),
        aa_hrtattack_correct = ifelse(aa_hrtattack == "Yes", "Yes", "No"),
        aa_cancer_correct = ifelse(aa_cancer == "No", "Yes", "No"),
        aa_stroke_correct = ifelse(aa_stroke == "Yes", "Yes", "No"),
        aa_kidneyp_correct = ifelse(aa_kidneyp == "Yes", "Yes", "No"),
        aa_highrisk_correct = ifelse(aa_highrisk == "Yes", "Yes", "No"),
        aa_headache_correct = ifelse(aa_headache == "No", "Yes", "No"),
        aa_feelgood_correct = ifelse(aa_feelgood == "Never", "Yes", "No"),
        aa_strokeris_correct = ifelse(
            aa_strokeris == "The Rest of Their Life", "Yes", "No"),
        aa_hkq = (aa_bp_115_75_corrrect == "Yes") + 
            (aa_bp160_100_correct == "Yes") +
            (aa_hptlasts_correct =="Yes") + 
            (aa_hptmeds_correct == "Yes") + 
            (aa_losewght_correct == "Yes") + 
            (aa_eatsalt_correct == "Yes") + 
            (aa_hrtattack_correct == "Yes") + 
            (aa_cancer_correct == "Yes") + 
            (aa_stroke_correct == "Yes") + 
            (aa_kidneyp_correct == "Yes") + 
            (aa_highrisk_correct == "Yes") + 
            (aa_headache_correct =="Yes") + 
            (aa_feelgood_correct =="Yes") + 
            (aa_strokeris_correct == "Yes"),
        mobility = case_when(
            str_detect(
                p_mobility , "I have no problems in walking about") ~ "1",
            str_detect(
                p_mobility , "I have some problems in walking about") ~ "2",
            str_detect(
                p_mobility , "I am confined to bed") ~ "3")%>% 
            as.numeric(),
        selfcare = case_when(
            str_detect(
                p_selfcare , "I have no problems with self-care") ~ "1",
            str_detect(
                p_selfcare , "I have some problems with washing or") ~ "2",
            str_detect(
                p_selfcare , 
                "I am unable to wash or dress myself") ~ "3")%>%
            as.numeric(),
        usual_act = case_when(
            str_detect(
                p_usual_act , 
                "I have no problems with performing my") ~ "1",
            str_detect(
                p_usual_act , "I have some problems with performing") ~ "2",
            str_detect(
                p_usual_act , "I am unable to perform my usual activitie") ~
                "3")%>% 
            as.numeric(),
        pain_disc = case_when(
            str_detect(p_pain_disc , "I have no pain or discomfort") ~ "1",
            str_detect(
                p_pain_disc , "I have moderate pain or discomfort") ~ "2",
            str_detect(
                p_pain_disc , 
                "I have extreme pain or discomfort") ~ "3") %>%
            as.numeric(),
        anxiety = case_when(
            str_detect(p_anxiety, "I am not anxious or depressed") ~ "1",
            str_detect(
                p_anxiety, "I am moderately anxious or depressed") ~ "2",
            str_detect(
                p_anxiety, "I am extremely anxious or depressed") ~ "3")%>% 
            as.numeric(),
        eq_5d = mobility + selfcare + usual_act + pain_disc + anxiety,
         p_health = ifelse(p_health <= 1, p_health*100, p_health), 
        across(
            c(bb_physical, bb_nutfacts, bb_repsalt, bb_limsalt, bb_tabsalt, 
              bb_eatsfood, 
            bb_broilst, bb_rsfoods, bb_rephfat, bb_totcal, bb_eatveges, 
            bb_alcohol, bb_smoking, bb_bpathome, bb_fbpmeds, bb_takemeds,
            bb_wgtdown, bb_monitst, bb_streslow, bb_doctor, bb_physical2,
            bb_nutfacts2, bb_repsalt2,bb_limsalt2, bb_tabsalt2,
            bb_eatsfood2, bb_broilst2, bb_rsfoods2, bb_rephfat2, 
            bb_totcal2, bb_eatveges2, bb_alcohol2, bb_smoking2, 
            bb_bpathome2, bb_fbpmeds2, bb_takemeds2, bb_wgtdown2,
            bb_monitst2, bb_streslow2, bb_doctor2,  bb_physical3,
            bb_nutfacts3, bb_repsalt3, bb_limsalt3, bb_tabsalt3, 
            bb_eatsfood3, bb_broilst3, bb_rsfoods3, bb_rephfat3, 
            bb_totcal3, bb_eatveges3, bb_alcohol3, bb_smoking3,
            bb_bpathome3, bb_fbpmeds3, bb_takemeds3, bb_wgtdown3, 
            bb_monitst3, bb_streslow3, bb_doctor3), 
            .fns = ~factor(.x),
            .names = "{.col}_unclassed"),
        across(
            c(bb_physical_unclassed, bb_nutfacts_unclassed,
              bb_repsalt_unclassed, 
              bb_limsalt_unclassed, bb_tabsalt_unclassed,
              bb_eatsfood_unclassed, 
            bb_broilst_unclassed, bb_rsfoods_unclassed,
            bb_rephfat_unclassed, 
            bb_totcal_unclassed, bb_eatveges_unclassed, 
            bb_alcohol_unclassed, 
            bb_smoking_unclassed, bb_bpathome_unclassed,
            bb_fbpmeds_unclassed, 
            bb_takemeds_unclassed, bb_wgtdown_unclassed,
            bb_monitst_unclassed, 
            bb_streslow_unclassed, bb_doctor_unclassed,
            bb_physical2_unclassed, 
            bb_nutfacts2_unclassed, bb_repsalt2_unclassed,
            bb_limsalt2_unclassed, 
            bb_tabsalt2_unclassed, bb_eatsfood2_unclassed,
            bb_broilst2_unclassed, 
            bb_rsfoods2_unclassed, bb_rephfat2_unclassed,
            bb_totcal2_unclassed, 
            bb_eatveges2_unclassed, bb_alcohol2_unclassed,
            bb_smoking2_unclassed, 
            bb_bpathome2_unclassed, bb_fbpmeds2_unclassed,
            bb_takemeds2_unclassed, 
            bb_wgtdown2_unclassed, bb_monitst2_unclassed,
            bb_streslow2_unclassed, 
            bb_doctor2_unclassed, bb_physical3_unclassed,
            bb_nutfacts3_unclassed,
            bb_repsalt3_unclassed, bb_limsalt3_unclassed,
            bb_tabsalt3_unclassed, 
            bb_eatsfood3_unclassed, bb_broilst3_unclassed,
            bb_rsfoods3_unclassed, 
            bb_rephfat3_unclassed, bb_totcal3_unclassed,
            bb_eatveges3_unclassed, 
            bb_alcohol3_unclassed, bb_smoking3_unclassed,
            bb_bpathome3_unclassed, 
            bb_fbpmeds3_unclassed, bb_takemeds3_unclassed,
            bb_wgtdown3_unclassed, 
            bb_monitst3_unclassed, bb_streslow3_unclassed,
            bb_doctor3_unclassed), 
            .fns = ~unclass(.x)),
        across(
          c(bb_fbpmeds_unclassed, bb_takemeds_unclassed,
            bb_fbpmeds2_unclassed, bb_takemeds2_unclassed,
            bb_fbpmeds3_unclassed, bb_takemeds3_unclassed), 
          .fns = ~ 0 - .x + 5),
        hpt_self_care = bb_physical_unclassed + bb_nutfacts_unclassed + 
          bb_repsalt_unclassed + 
            bb_limsalt_unclassed + bb_tabsalt_unclassed + 
            bb_eatsfood_unclassed + 
            bb_broilst_unclassed + bb_rsfoods_unclassed + 
            bb_rephfat_unclassed + 
            bb_totcal_unclassed + bb_eatveges_unclassed + 
            bb_alcohol_unclassed + 
            bb_smoking_unclassed + bb_bpathome_unclassed + 
            bb_fbpmeds_unclassed + 
            bb_takemeds_unclassed + bb_wgtdown_unclassed + 
            bb_monitst_unclassed + 
            bb_streslow_unclassed + bb_doctor_unclassed + 
            bb_physical2_unclassed + 
            bb_nutfacts2_unclassed + bb_repsalt2_unclassed + 
            bb_limsalt2_unclassed + 
            bb_tabsalt2_unclassed + bb_eatsfood2_unclassed + 
            bb_broilst2_unclassed + 
            bb_rsfoods2_unclassed + bb_rephfat2_unclassed + 
            bb_totcal2_unclassed + 
            bb_eatveges2_unclassed + bb_alcohol2_unclassed +  
            bb_smoking2_unclassed + 
            bb_bpathome2_unclassed + bb_fbpmeds2_unclassed + 
            bb_takemeds2_unclassed + 
            bb_wgtdown2_unclassed + bb_monitst2_unclassed + 
            bb_streslow2_unclassed + 
            bb_doctor2_unclassed + bb_physical3_unclassed + 
            bb_nutfacts3_unclassed +
            bb_repsalt3_unclassed + bb_limsalt3_unclassed + 
            bb_tabsalt3_unclassed + 
            bb_eatsfood3_unclassed + bb_broilst3_unclassed + 
            bb_rsfoods3_unclassed + 
            bb_rephfat3_unclassed + bb_totcal3_unclassed + 
            bb_eatveges3_unclassed + 
            bb_alcohol3_unclassed + bb_smoking3_unclassed + 
            bb_bpathome3_unclassed + 
            bb_fbpmeds3_unclassed + bb_takemeds3_unclassed + 
            bb_wgtdown3_unclassed + 
            bb_monitst3_unclassed + bb_streslow3_unclassed + 
            bb_doctor3_unclassed, 
        sbp_2 = sbp, 
        dbp_2 = dbp, 
        sbp_baseline = case_when(eventname == "Baseline" ~ sbp),
        dbp_baseline = case_when(eventname == "Baseline" ~ dbp),
        stroke_type = case_when(
          d_st_type == "Ischemic Stroke" ~ "Ischemic",
          d_st_type == 
              "Intracerebral Hemorrhagic Stroke" ~ "Hemorrhagic") %>% 
          factor(),
        hosp_cat2 = case_when(
          hosp_cat %in% c("Primary","Secondary") ~ "Primary/Secondary",
          hosp_cat == "Tertiary" ~ "Tertiary"),
        egfr0 = parse_number(ff_egfr_0),
        egfr0 = ifelse(egfr0 < 1, egfr0*100, egfr0),
        egfr_cat = case_when(egfr0 < 60 ~ "<60", egfr0 >= 60 ~ ">=60"),
        across(
            c(m12_pratio_1, m12_pratio_2, m12_pratio_3, m12_pratio_4, 
            m12_pratio_5, m12_pratio_6, m12_pratio_7, m12_pratio_8), 
              ~parse_number(.)),
        emerg_visit = case_when(
          gg_emerg_0 == "seizure" ~ "Yes",
          gg_emerg_1 == "Stage III HPT" ~ "Yes", 
          gg_emerg_3 %in% c("Seizure","Yes") ~ "Yes", 
          gg_emerg_6 %in%  c("seizure (recurrent stroke)", "YES") ~ "Yes",
          eventname == "Baseline" ~ "No"),
        emerg_visit = emerg_visit == "Yes",
        mpr12 = rowMeans(
          across(
            c(m12_pratio_1, m12_pratio_2, m12_pratio_3, m12_pratio_4, 
              m12_pratio_5, m12_pratio_6, m12_pratio_7, m12_pratio_8)), 
            na.rm=T),
        mpr12 = ifelse(mpr12 < 10, mpr12*10, mpr12),
        mpr12 = ifelse(mpr12 > 200, mpr12/10, mpr12),
        mpr12 = ifelse(mpr12 > 100, 100, mpr12),
        sbp_gr_eq_160_baseline = case_when(
          sbp < 160 & eventname == "Baseline" ~ "<160mmHg",
          sbp >= 160 & eventname == "Baseline" ~ ">=160mmHg")) %>% 
      arrange(pid, eventname) %>% 
      group_by(pid) %>% 
      fill(
        sbp_2, dbp_2, arm, sbp_baseline, dbp_baseline, emerg_visit, dm, 
        d_st_type, arm) %>% 
      ungroup() %>% 
      mutate(
          sbp_less_140_itt = sbp_2 < 140, 
          sbp_less_140_pp = sbp < 140, 
          bp_less_140_90_itt = (sbp_2 < 140 & dbp_2 < 90),
          bp_less_140_90_pp = (sbp < 140 & dbp < 90),
          sbp_diff = sbp_baseline - sbp,
          dbp_diff = dbp_baseline - dbp,
          sbp_diff_itt = sbp_baseline - sbp_2,
          dbp_diff_itt = dbp_baseline - dbp_2,
          sbp_less_135_itt = sbp_2 < 135, 
          sbp_less_135_pp = sbp < 135,
          sbp_less_130_itt = sbp_2 < 130, 
          sbp_less_130_pp = sbp < 130, 
          review_no = case_when(
            eventname == "Baseline" & !is.na(sbp) ~ 0,
            eventname == "Month 1"  & !is.na(sbp) ~ 1,
            eventname == "Month 3" & !is.na(sbp) ~ 3,
            eventname == "Month 6"  & !is.na(sbp) ~ 6,
            eventname == "Month 9" & !is.na(sbp) ~ 9,
            eventname == "Month12" & !is.na(sbp) ~ 12),
          d_st_type_2 = fct_recode(
              d_st_type, 
              "Ischemic Stroke" = 
                  "Ischemic With Hemorrhagic Transformation")) %>% 
      arrange(pid, eventname) %>% 
      group_by(pid) %>% 
      mutate(
        max_review = max(review_no, na.rm = T),
        completed_study = case_when(
          max_review == 12 ~ "Yes", TRUE ~ "No") %>% factor()) %>% 
      ungroup()

Labelling main data

Show the code
df_pings2_bp <- 
    df_pings2_bp %>% 
    labelled::set_variable_labels(
            female = "Gender, female",
            d_st_type = "Type of Stroke",
            nihss_scale ="Stroke Severity (NIHSS)",
            ranking = "Modified Ranking Score",
            dm = "Diabetes Mellitus",
            sbp = "Systolic Blood Pressure",
            dbp = "Diastolic Blood Pressure",
            hpt = "Hypertesion",
            hyperlipidemia = "Hyperlipidemia", 
            tobacco_use = "Cigarette smoking", 
            obese_overwgt  = "Overweight & obesity",
            alcohol_curr = "Alcohol use, current", 
            acei = "ACE-Inhibitors",
            arb = "ARB",
            bb = "B-blockers",
            ccb = "Calcium channel blocker",
            diuretics = "Diuretics", 
            female = "Gender, female",
            income2 = "Income level", 
            educ2 = "Educational Level",
            agecat = "Age in years",
            h_alpha_md = "Alpha Methyl Dopa",
            h_alpha_ab = "Alpha Adrenergic Blockers",
            h_antiplt = "Antiplatelets",
            h_statins = "Statins",
            morisky_4_item = "Morisky (4 Items)",
            hillbone = "Total Hillbone Score",
            aa_hkq = "Health Literacy in HPT/stroke",
            eq_5d = "Health Related QoL",
            p_health = "Health Related QoL", 
            hpt_self_care = "Hypertension Self Care", 
            sbp_less_140_itt = "SBP < 140 mmHg at month 12 (ITT)",
            sbp_less_140_pp = "SBP < 140 mmHg at month 12 (PP)", 
            bp_less_140_90_itt = "BP < 140/90 mmHg at month 12 (ITT)", 
            bp_less_140_90_pp = "BP < 140/90 mmHg at month 12 (PP)",
            sbp_diff = "Change in SBP(month 12 from baseline - PP)",
            dbp_diff = "Change in DBP(month 12 from baseline - PP)",
            sbp_less_130_itt = "SBP < 130 mmHg at month 12 (ITT)",
            sbp_less_130_pp = "SBP < 130 mmHg at month 12 (PP)",
            sbp_less_135_itt = "SBP < 135 mmHg at month 12 (ITT)",
            sbp_less_135_pp = "SBP < 135 mmHg at month 12 (PP)",
            max_review = "Follow-up period",
            review_no = "Review number",
            completed_study = "Completed Study",
            sbp_2 = "Systolic Blood Pressure (ITT)", 
            dbp_2 = "Systolic Blood Pressure (ITT)", 
            sbp_baseline = "Systolic Blood Pressure (Baseline)",
            dbp_baseline = "Diastolic Blood Pressure (Baseline)",
            sbp_diff_itt ="Change in SBP(month 12 from baseline)- ITT",
            dbp_diff_itt = "Change in DBP(month 12 from baseline) - ITT")

Drugs data

Show the code
df_drugs_class_raw <- 
  readxl::read_xlsx(
      "Data/drugs_data_clean_10122025.xlsx", sheet = 1) %>% 
    filter(!is.na(hpt_drug_class) & eventname == "Baseline")

df_drugs_class <- 
  readxl::read_xlsx(
      "Data/drugs_data_clean_10122025.xlsx", sheet = 1) %>% 
    filter(!is.na(hpt_drug_class) & eventname == "Baseline") %>% 
    select(pid, hpt_drug_class, antihpt) %>% 
    pivot_wider(
        id_cols = pid, 
        names_from = hpt_drug_class, 
        values_from = antihpt) %>% 
    unnest(-pid) %>% 
    slice(-15) %>%
    mutate(across(BB:`ALPHA BLOCKER`, ~ifelse(is.na(.x), 0, .x))) %>% 
    arrange(pid) %>% 
    distinct()
Warning: Values from `antihpt` are not uniquely identified; output will contain
list-cols.
• Use `values_fn = list` to suppress this warning.
• Use `values_fn = {summary_fun}` to summarise duplicates.
• Use the following dplyr code to identify duplicates.
  {data} |>
  dplyr::summarise(n = dplyr::n(), .by = c(pid, hpt_drug_class)) |>
  dplyr::filter(n > 1L)
Show the code
df_max_drug_doses_temp <- 
  readxl::read_xlsx(
      "Data/PINGS_Antihypertensive Maximum doses.xlsx", sheet = 2)

df_drugs <-
    df_drugs_class_raw %>%
    left_join(df_max_drug_doses_temp, by = "drug") %>%
    mutate(
        dose_index = freq_number*dose_number/maxi,
        antihpt  = case_when(is.na(antihpt) ~ 0, TRUE ~ antihpt)) %>%
    filter(antihpt == 1) %>%
    group_by(pid, eventname, arm) %>%
    summarize(
      n_hpts = sum(antihpt),
      dose_index = sum(dose_index)) %>%
    ungroup() %>%
    filter(eventname == "Baseline")
`summarise()` has grouped output by 'pid', 'eventname'. You can override using
the `.groups` argument.

MACE and All Cause Mortality data

Show the code
df_pings_cox <- 
    readxl::read_xlsx(
      "Data/PINGS_MACE and Participant follow-up_2026.xlsx", 
      sheet = 3) %>% 
    janitor::clean_names() %>% 
    rename(
        all_cause = all_cause_death_1_0, 
        dura_all_cause = time_to_all_cause_deaths,
        mace = mace_1_0,
        dura_mace = time_to_mace, 
        mace_all_cause = mace_plus_all_cause_deaths, 
        dura_mace_all_cause = time_to_mace_all_cause_death) %>% 
    mutate(
        pid = sub("-(\\d)$", "-0\\1", participant_id), 
        arm = factor(
          allocation, 
          levels = c("Arm 2- Routine Care", "Arm 1- Intervention Arm"), 
          labels = c("Routine", "Intervention")), 
        mace_factor = factor(
            mace, 
            levels = c(0, 1), 
            label = c("No", "Yes")) %>% factor(), 
        all_cause_factor = case_when(
            all_cause == 0 ~ "No",
            all_cause == 1 ~ "Yes") %>% factor(),
        mace_all_cause_factor = case_when(
            mace_all_cause == 0 ~ "No", 
            mace_all_cause == 1 ~ "Yes") %>% factor()) %>%
    select(-c(serial_number, participant_id, allocation)) 

Final combined data

Show the code
df_for_mace_paper <- 
    df_pings2_bp %>%  
    filter(eventname == "Baseline") %>%
    full_join(df_pings_cox) %>%
    full_join(df_drugs_class) %>% 
    full_join(df_drugs) %>% 
    mutate(across(BB:`ALPHA BLOCKER`, ~ifelse(is.na(.x), 0, .x))) %>% 
    select(
        mace, all_cause, mace_all_cause, mace_factor, all_cause_factor, 
        mace_all_cause_factor, dura_mace, dura_all_cause, dura_mace_all_cause,
        a_agebase, a_gender, educ, a_maristat, a_domicile,  
        a_income, a_religion, d_st_type, d_st_type_2, nihss_scale, ranking, 
        hyperlipidemia, hpt, sbp_gr_eq_160_baseline, dm, tobacco_use,
        obese_overwgt, bmi_cat, ff_hba1c_0, hba1c_high, sbp, dbp, 
        BB:`ALPHA BLOCKER`, dose_index, h_antiplt, h_statins, 
        hillbone, aa_hkq, arm, hosp_cat, include_exclude)
Joining with `by = join_by(pid, arm)`
Joining with `by = join_by(pid)`
Joining with `by = join_by(pid, eventname, arm)`
Show the code
df_for_mace_paper <- 
    df_for_mace_paper %>% 
    labelled::set_variable_labels(
            mace = "MACE", 
            mace_factor = "MACE", 
            dura_mace = "Time to MACE",
            all_cause = "All Cause Mortality",
            all_cause_factor = "All Cause Mortality",
            dura_all_cause = "Time to All Cause Mortality",
            mace_all_cause = "MACE or Mortality", 
            mace_all_cause_factor = "MACE or Mortality", 
            dura_mace_all_cause = "Time to MACE/Mortality", 
            d_st_type_2 = "Stroke Type",
            sbp_gr_eq_160_baseline = "Baseline SBP >= 160mmHg",
            bmi_cat = "Categorised BMI", 
            hba1c_high = "High HbA1C", 
            dose_index = "Dose Index", 
            arm = "Study Arm", 
            hosp_cat = "Healthcare Facility Type")

Table 0 - All data summary

Show the code
gtsummary::theme_gtsummary_eda()
Setting theme "Exploratory Data Analysis"
Show the code
gtsummary::theme_gtsummary_compact()
Setting theme "Compact"
Show the code
df_for_mace_paper %>%
  gtsummary::tbl_summary() %>% 
  gtsummary::bold_labels()
Characteristic N = 5001
MACE 24 (4.80%)
All Cause Mortality 26 (5.20%)
MACE or Mortality 35 (7.00%)
MACE 24 (4.80%)
All Cause Mortality 26 (5.20%)
MACE or Mortality 35 (7.00%)
Time to MACE
    Median (Q1, Q3) 365 (336, 365)
    Mean (SD) 317 (97)
    Min, Max 0, 365
Time to All Cause Mortality
    Median (Q1, Q3) 365 (336, 365)
    Mean (SD) 318 (95)
    Min, Max 0, 365
Time to MACE/Mortality
    Median (Q1, Q3) 365 (336, 365)
    Mean (SD) 317 (97)
    Min, Max 0, 365
Age in years
    Median (Q1, Q3) 58 (51, 67)
    Mean (SD) 58 (11)
    Min, Max 29, 88
Gender
    Male 281 (56.2%)
    Female 219 (43.8%)
Level of Formal education
    None 49 (9.80%)
    Primary 203 (40.6%)
    Secondary 165 (33.0%)
    Tertiary 83 (16.6%)
Marital Status
    Never Married 23 (4.60%)
    Currently Married 325 (65.0%)
    Separated 38 (7.60%)
    Widow/Widower 84 (16.8%)
    Cohabitating 8 (1.60%)
    Divorced 22 (4.40%)
Domicile
    Rural 33 (6.60%)
    Semi-Urban 166 (33.2%)
    Urban 301 (60.2%)
Income Bracket
    0-100 174 (35.0%)
    101-250 150 (30.2%)
    251-500 109 (21.9%)
    501-1500 43 (8.65%)
    1501-3000 15 (3.02%)
    > 3000 6 (1.21%)
    Unknown 3
Religion
    Christianity 448 (89.6%)
    Islam 49 (9.80%)
    Other 3 (0.60%)
Type of Stroke
    Ischemic Stroke 332 (73.8%)
    Intracerebral Hemorrhagic Stroke 103 (22.9%)
    Ischemic With Hemorrhagic Transformation 10 (2.22%)
    Untyped Stroke (no CT scan available) 5 (1.11%)
    Unknown 50
Stroke Type
    Ischemic Stroke 342 (76.0%)
    Intracerebral Hemorrhagic Stroke 103 (22.9%)
    Untyped Stroke (no CT scan available) 5 (1.11%)
    Unknown 50
Stroke Severity (NIHSS)
    Median (Q1, Q3) 3.0 (0.0, 8.0)
    Mean (SD) 4.6 (5.3)
    Min, Max 0.0, 23.0
    Unknown 13
Modified Ranking Score
    0 42 (8.45%)
    1 118 (23.7%)
    2 136 (27.4%)
    3 100 (20.1%)
    4 97 (19.5%)
    5 4 (0.80%)
    Unknown 3
Hyperlipidemia 160 (32.0%)
Hypertesion 469 (93.8%)
Baseline SBP >= 160mmHg
    <160mmHg 323 (64.6%)
    >=160mmHg 177 (35.4%)
Diabetes Mellitus 169 (33.8%)
Cigarette smoking 45 (9.26%)
    Unknown 14
Overweight & obesity 258 (59.9%)
    Unknown 69
Categorised BMI
    Normal 173 (40.1%)
    Overweight 140 (32.5%)
    Obese 118 (27.4%)
    Unknown 69
HBA1C (Baseline)
    Median (Q1, Q3) 5.80 (5.40, 6.70)
    Mean (SD) 6.49 (2.05)
    Min, Max 3.00, 16.10
    Unknown 108
High HbA1C 118 (30.1%)
    Unknown 108
Systolic Blood Pressure
    Median (Q1, Q3) 153 (145, 168)
    Mean (SD) 158 (19)
    Min, Max 114, 263
Diastolic Blood Pressure
    Median (Q1, Q3) 94 (87, 102)
    Mean (SD) 95 (14)
    Min, Max 62, 164
BB 70 (14.0%)
CCB 401 (80.2%)
ARB 263 (52.6%)
DIURETIC 139 (27.8%)
METHYLDOPA 38 (7.60%)
ACEI 94 (18.8%)
VASODILATOR 35 (7.00%)
ALPHA BLOCKER 1 (0.20%)
Dose Index
    Median (Q1, Q3) 1.33 (0.83, 1.83)
    Mean (SD) 1.42 (0.76)
    Min, Max 0.06, 4.50
    Unknown 61
Antiplatelets 299 (64.4%)
    Unknown 36
Statins 362 (77.8%)
    Unknown 35
Total Hillbone Score
    Median (Q1, Q3) 52.0 (50.0, 53.0)
    Mean (SD) 50.9 (4.1)
    Min, Max 29.0, 56.0
    Unknown 9
Health Literacy in HPT/stroke
    Median (Q1, Q3) 8 (6, 10)
    Mean (SD) 8 (3)
    Min, Max 0, 13
    Unknown 30
Study Arm
    Intervention 244 (48.8%)
    Routine 256 (51.2%)
Healthcare Facility Type
    Primary 148 (29.6%)
    Secondary 119 (23.8%)
    Tertiary 233 (46.6%)
include_exclude
    EXCLUDE 27 (5.40%)
    INCLUDE 473 (94.6%)
1 n (%)

MACE

Table 1: MACE - Descriptive statistics

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
    select(
      -c(mace, all_cause, mace_all_cause, all_cause_factor,
         mace_all_cause_factor, dura_all_cause, 
         dura_mace_all_cause, include_exclude)) %>% 
    gtsummary::tbl_summary(by = mace_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MACE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by MACE")

table_one 
Table 1: Distribution of covariate by MACE
Characteristic
MACE
p-value2
No
N = 4491
Yes
N = 241
Overall
N = 4731
Time to MACE 365 (336, 365) 122 (62, 341) 365 (336, 365) <0.001
Age in years 58 (51, 67) 64 (52, 70) 58 (51, 67) 0.2
Gender


0.8
    Male 249 (55%) 14 (58%) 263 (56%)
    Female 200 (45%) 10 (42%) 210 (44%)
Level of Formal education


0.2
    None 45 (10%) 3 (13%) 48 (10%)
    Primary 188 (42%) 5 (21%) 193 (41%)
    Secondary 142 (32%) 11 (46%) 153 (32%)
    Tertiary 74 (16%) 5 (21%) 79 (17%)
Marital Status


0.7
    Never Married 21 (4.7%) 1 (4.2%) 22 (4.7%)
    Currently Married 290 (65%) 17 (71%) 307 (65%)
    Separated 35 (7.8%) 2 (8.3%) 37 (7.8%)
    Widow/Widower 76 (17%) 3 (13%) 79 (17%)
    Cohabitating 6 (1.3%) 1 (4.2%) 7 (1.5%)
    Divorced 21 (4.7%) 0 (0%) 21 (4.4%)
Domicile


0.4
    Rural 26 (5.8%) 2 (8.3%) 28 (5.9%)
    Semi-Urban 149 (33%) 10 (42%) 159 (34%)
    Urban 274 (61%) 12 (50%) 286 (60%)
Income Bracket


0.4
    0-100 162 (36%) 8 (33%) 170 (36%)
    101-250 132 (30%) 7 (29%) 139 (30%)
    251-500 93 (21%) 8 (33%) 101 (21%)
    501-1500 42 (9.4%) 0 (0%) 42 (8.9%)
    1501-3000 12 (2.7%) 1 (4.2%) 13 (2.8%)
    > 3000 5 (1.1%) 0 (0%) 5 (1.1%)
    Unknown 3 0 3
Religion


0.2
    Christianity 405 (90%) 19 (79%) 424 (90%)
    Islam 41 (9.1%) 5 (21%) 46 (9.7%)
    Other 3 (0.7%) 0 (0%) 3 (0.6%)
Type of Stroke


0.7
    Ischemic Stroke 298 (74%) 18 (86%) 316 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (14%) 95 (22%)
    Ischemic With Hemorrhagic Transformation 10 (2.5%) 0 (0%) 10 (2.3%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.2%)
    Unknown 44 3 47
Stroke Type


0.6
    Ischemic Stroke 308 (76%) 18 (86%) 326 (77%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (14%) 95 (22%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.2%)
    Unknown 44 3 47
Stroke Severity (NIHSS) 3.0 (0.0, 8.0) 7.5 (0.0, 13.5) 3.0 (0.0, 8.0) 0.023
    Unknown 11 0 11
Modified Ranking Score


0.060
    0 35 (7.8%) 4 (17%) 39 (8.3%)
    1 104 (23%) 3 (13%) 107 (23%)
    2 125 (28%) 3 (13%) 128 (27%)
    3 92 (21%) 6 (25%) 98 (21%)
    4 88 (20%) 7 (29%) 95 (20%)
    5 3 (0.7%) 1 (4.2%) 4 (0.8%)
    Unknown 2 0 2
Hyperlipidemia 147 (33%) 5 (21%) 152 (32%) 0.2
Hypertesion 421 (94%) 24 (100%) 445 (94%) 0.4
Baseline SBP >= 160mmHg


0.14
    <160mmHg 291 (65%) 12 (50%) 303 (64%)
    >=160mmHg 158 (35%) 12 (50%) 170 (36%)
Diabetes Mellitus 149 (33%) 9 (38%) 158 (33%) 0.7
Cigarette smoking 36 (8.3%) 6 (25%) 42 (9.1%) 0.016
    Unknown 13 0 13
Overweight & obesity 233 (60%) 16 (80%) 249 (61%) 0.068
    Unknown 58 4 62
Categorised BMI


0.2
    Normal 158 (40%) 4 (20%) 162 (39%)
    Overweight 127 (32%) 9 (45%) 136 (33%)
    Obese 106 (27%) 7 (35%) 113 (27%)
    Unknown 58 4 62
HBA1C (Baseline) 5.80 (5.40, 6.70) 6.30 (5.65, 9.25) 5.80 (5.40, 6.70) 0.10
    Unknown 94 4 98
High HbA1C 101 (28%) 8 (40%) 109 (29%) 0.3
    Unknown 94 4 98
Systolic Blood Pressure 153 (145, 168) 158 (147, 175) 154 (146, 168) 0.2
Diastolic Blood Pressure 94 (87, 101) 95 (85, 106) 94 (87, 102) 0.7
BB 64 (14%) 4 (17%) 68 (14%) 0.8
CCB 366 (82%) 19 (79%) 385 (81%) 0.8
ARB 244 (54%) 9 (38%) 253 (53%) 0.11
DIURETIC 126 (28%) 8 (33%) 134 (28%) 0.6
METHYLDOPA 35 (7.8%) 2 (8.3%) 37 (7.8%) >0.9
ACEI 82 (18%) 8 (33%) 90 (19%) 0.10
VASODILATOR 33 (7.3%) 1 (4.2%) 34 (7.2%) >0.9
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.83, 1.75) 1.33 (0.83, 1.83) 0.7
    Unknown 49 3 52
Antiplatelets 267 (63%) 17 (85%) 284 (64%) 0.049
    Unknown 28 4 32
Statins 325 (77%) 16 (80%) 341 (77%) >0.9
    Unknown 27 4 31
Total Hillbone Score 52.0 (50.0, 53.0) 51.0 (46.0, 53.0) 52.0 (50.0, 53.0) 0.13
    Unknown 7 1 8
Health Literacy in HPT/stroke 8 (6, 10) 7 (3, 9) 8 (6, 10) 0.2
    Unknown 28 1 29
Study Arm


0.8
    Intervention 219 (49%) 11 (46%) 230 (49%)
    Routine 230 (51%) 13 (54%) 243 (51%)
Healthcare Facility Type


0.4
    Primary 138 (31%) 5 (21%) 143 (30%)
    Secondary 104 (23%) 8 (33%) 112 (24%)
    Tertiary 207 (46%) 11 (46%) 218 (46%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_one.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_one.docx") 

Table 1: MACE - Descriptive statistics (All data)

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  mutate(
    mace = case_when(
      include_exclude == "EXCLUDE" ~ 1, TRUE ~ mace), 
    mace_factor = factor(mace, levels = 0:1, labels = c("No", "Yes"))) %>% 
    select(
      -c(mace, all_cause, mace_all_cause, all_cause_factor,
         mace_all_cause_factor, dura_all_cause, 
         dura_mace_all_cause, include_exclude)) %>% 
    gtsummary::tbl_summary(by = mace_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MACE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by MACE (Added Cases)")

table_one 
Table 1: Distribution of covariate by MACE (Added Cases)
Characteristic
MACE
p-value2
No
N = 4491
Yes
N = 511
Overall
N = 5001
Time to MACE 365 (336, 365) 270 (47, 365) 365 (336, 365) <0.001
Age in years 58 (51, 67) 62 (49, 68) 58 (51, 67) 0.4
Gender


0.3
    Male 249 (55%) 32 (63%) 281 (56%)
    Female 200 (45%) 19 (37%) 219 (44%)
Level of Formal education


0.2
    None 45 (10%) 4 (7.8%) 49 (9.8%)
    Primary 188 (42%) 15 (29%) 203 (41%)
    Secondary 142 (32%) 23 (45%) 165 (33%)
    Tertiary 74 (16%) 9 (18%) 83 (17%)
Marital Status


0.7
    Never Married 21 (4.7%) 2 (3.9%) 23 (4.6%)
    Currently Married 290 (65%) 35 (69%) 325 (65%)
    Separated 35 (7.8%) 3 (5.9%) 38 (7.6%)
    Widow/Widower 76 (17%) 8 (16%) 84 (17%)
    Cohabitating 6 (1.3%) 2 (3.9%) 8 (1.6%)
    Divorced 21 (4.7%) 1 (2.0%) 22 (4.4%)
Domicile


0.11
    Rural 26 (5.8%) 7 (14%) 33 (6.6%)
    Semi-Urban 149 (33%) 17 (33%) 166 (33%)
    Urban 274 (61%) 27 (53%) 301 (60%)
Income Bracket


0.045
    0-100 162 (36%) 12 (24%) 174 (35%)
    101-250 132 (30%) 18 (35%) 150 (30%)
    251-500 93 (21%) 16 (31%) 109 (22%)
    501-1500 42 (9.4%) 1 (2.0%) 43 (8.7%)
    1501-3000 12 (2.7%) 3 (5.9%) 15 (3.0%)
    > 3000 5 (1.1%) 1 (2.0%) 6 (1.2%)
    Unknown 3 0 3
Religion


0.3
    Christianity 405 (90%) 43 (84%) 448 (90%)
    Islam 41 (9.1%) 8 (16%) 49 (9.8%)
    Other 3 (0.7%) 0 (0%) 3 (0.6%)
Type of Stroke


0.9
    Ischemic Stroke 298 (74%) 34 (76%) 332 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (24%) 103 (23%)
    Ischemic With Hemorrhagic Transformation 10 (2.5%) 0 (0%) 10 (2.2%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.1%)
    Unknown 44 6 50
Stroke Type


>0.9
    Ischemic Stroke 308 (76%) 34 (76%) 342 (76%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (24%) 103 (23%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.1%)
    Unknown 44 6 50
Stroke Severity (NIHSS) 3.0 (0.0, 8.0) 1.0 (0.0, 8.0) 3.0 (0.0, 8.0) 0.6
    Unknown 11 2 13
Modified Ranking Score


0.4
    0 35 (7.8%) 7 (14%) 42 (8.5%)
    1 104 (23%) 14 (28%) 118 (24%)
    2 125 (28%) 11 (22%) 136 (27%)
    3 92 (21%) 8 (16%) 100 (20%)
    4 88 (20%) 9 (18%) 97 (20%)
    5 3 (0.7%) 1 (2.0%) 4 (0.8%)
    Unknown 2 1 3
Hyperlipidemia 147 (33%) 13 (25%) 160 (32%) 0.3
Hypertesion 421 (94%) 48 (94%) 469 (94%) >0.9
Baseline SBP >= 160mmHg


0.8
    <160mmHg 291 (65%) 32 (63%) 323 (65%)
    >=160mmHg 158 (35%) 19 (37%) 177 (35%)
Diabetes Mellitus 149 (33%) 20 (39%) 169 (34%) 0.4
Cigarette smoking 36 (8.3%) 9 (18%) 45 (9.3%) 0.036
    Unknown 13 1 14
Overweight & obesity 233 (60%) 25 (63%) 258 (60%) 0.7
    Unknown 58 11 69
Categorised BMI


>0.9
    Normal 158 (40%) 15 (38%) 173 (40%)
    Overweight 127 (32%) 13 (33%) 140 (32%)
    Obese 106 (27%) 12 (30%) 118 (27%)
    Unknown 58 11 69
HBA1C (Baseline) 5.80 (5.40, 6.70) 6.30 (5.60, 9.30) 5.80 (5.40, 6.70) 0.019
    Unknown 94 14 108
High HbA1C 101 (28%) 17 (46%) 118 (30%) 0.027
    Unknown 94 14 108
Systolic Blood Pressure 153 (145, 168) 155 (145, 172) 153 (145, 168) 0.7
Diastolic Blood Pressure 94 (87, 101) 97 (86, 105) 94 (87, 102) 0.4
BB 64 (14%) 6 (12%) 70 (14%) 0.6
CCB 366 (82%) 35 (69%) 401 (80%) 0.029
ARB 244 (54%) 19 (37%) 263 (53%) 0.021
DIURETIC 126 (28%) 13 (25%) 139 (28%) 0.7
METHYLDOPA 35 (7.8%) 3 (5.9%) 38 (7.6%) 0.8
ACEI 82 (18%) 12 (24%) 94 (19%) 0.4
VASODILATOR 33 (7.3%) 2 (3.9%) 35 (7.0%) 0.6
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.83, 1.67) 1.33 (0.83, 1.83) 0.4
    Unknown 49 12 61
Antiplatelets 267 (63%) 32 (74%) 299 (64%) 0.2
    Unknown 28 8 36
Statins 325 (77%) 37 (86%) 362 (78%) 0.2
    Unknown 27 8 35
Total Hillbone Score 52.0 (50.0, 53.0) 51.0 (48.0, 53.0) 52.0 (50.0, 53.0) 0.047
    Unknown 7 2 9
Health Literacy in HPT/stroke 8 (6, 10) 8 (5, 10) 8 (6, 10) 0.7
    Unknown 28 2 30
Study Arm


>0.9
    Intervention 219 (49%) 25 (49%) 244 (49%)
    Routine 230 (51%) 26 (51%) 256 (51%)
Healthcare Facility Type


0.2
    Primary 138 (31%) 10 (20%) 148 (30%)
    Secondary 104 (23%) 15 (29%) 119 (24%)
    Tertiary 207 (46%) 26 (51%) 233 (47%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_one_ALL.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_one_ALL.docx") 

Table 2: MACE - Combined univariate & multivariate cox regression

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
  filter(dura_mace != 0) %>% 
    select(
      -c(mace_factor, all_cause, mace_all_cause, all_cause_factor,
         mace_all_cause_factor, dura_all_cause, 
         dura_mace_all_cause, include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_mace, 
        event = df_temp1$mace)


tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(mace, dura_mace)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, nihss_scale, tobacco_use, 
        ff_hba1c_0, hillbone) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::add_global_p() %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()

 
table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: MACE - Univartiate and multivariate cox regression") 

table_two 
Table 2: MACE - Univartiate and multivariate cox regression
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 468 1.02 0.99, 1.06 0.2 358 1.04 0.99, 1.09 0.083
Gender 468


358

0.5
    Male



    Female
0.90 0.40, 2.03 0.8
0.67 0.23, 1.95
Level of Formal education 468






    None





    Primary
0.40 0.10, 1.68 0.2



    Secondary
1.06 0.30, 3.81 >0.9



    Tertiary
0.97 0.23, 4.07 >0.9



Marital Status 468






    Never Married





    Currently Married
1.25 0.17, 9.42 0.8



    Separated
1.25 0.11, 13.8 0.9



    Widow/Widower
0.89 0.09, 8.57 >0.9



    Cohabitating
3.01 0.19, 48.1 0.4



    Divorced
0.00 0.00, Inf >0.9



Domicile 468






    Rural





    Semi-Urban
0.91 0.20, 4.16 >0.9



    Urban
0.57 0.13, 2.52 0.5



Income Bracket 465






    0-100





    101-250
1.10 0.40, 3.03 0.9



    251-500
1.84 0.69, 4.91 0.2



    501-1500
0.00 0.00, Inf >0.9



    1501-3000
1.83 0.23, 14.6 0.6



    > 3000
0.00 0.00, Inf >0.9



Religion 468






    Christianity





    Islam
2.34 0.87, 6.26 0.091



    Other
0.00 0.00, Inf >0.9



Type of Stroke 421






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.57 0.17, 1.94 0.4



    Ischemic With Hemorrhagic Transformation
0.00 0.00, Inf >0.9



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Type 421






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.59 0.17, 1.99 0.4



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 460 1.11 1.04, 1.17 <0.001 358 1.09 1.02, 1.17 0.010
Modified Ranking Score 467 1.19 0.86, 1.66 0.3



Hyperlipidemia 468






    No





    Yes
0.54 0.20, 1.45 0.2



Hypertesion 468






    No





    Yes
26,631,460 0.00, Inf >0.9



Baseline SBP >= 160mmHg 468






    <160mmHg





    >=160mmHg
1.83 0.82, 4.06 0.14



Diabetes Mellitus 468






    No





    Yes
1.19 0.52, 2.73 0.7



Cigarette smoking 456


358

0.045
    No



    Yes
3.39 1.35, 8.54 0.010
3.52 1.11, 11.1
Overweight & obesity 409






    No





    Yes
2.73 0.91, 8.17 0.072



Categorised BMI 409






    Normal





    Overweight
2.83 0.87, 9.19 0.083



    Obese
2.61 0.77, 8.93 0.13



HBA1C (Baseline) 372 1.17 1.00, 1.37 0.046 358 1.15 0.98, 1.36 0.12
High HbA1C 372






    No





    Yes
1.64 0.67, 4.01 0.3



Systolic Blood Pressure 468 1.01 1.0, 1.03 0.2



Diastolic Blood Pressure 468 1.00 0.97, 1.03 >0.9



BB 468 1.34 0.46, 3.93 0.6



CCB 468 0.85 0.32, 2.27 0.7



ARB 468 0.54 0.23, 1.23 0.14



DIURETIC 468 1.40 0.60, 3.27 0.4



METHYLDOPA 468 1.14 0.27, 4.83 0.9



ACEI 468 2.13 0.91, 4.98 0.081



VASODILATOR 468 0.60 0.08, 4.43 0.6



ALPHA BLOCKER 468 0.00 0.00, Inf >0.9



Dose Index 417 0.85 0.47, 1.55 0.6



Antiplatelets 436






    FALSE





    TRUE
3.20 0.94, 10.9 0.064



Statins 437






    FALSE





    TRUE
1.19 0.40, 3.56 0.8



Total Hillbone Score 461 0.92 0.85, 0.99 0.022 358 0.94 0.84, 1.06 0.3
Health Literacy in HPT/stroke 440 0.90 0.80, 1.02 0.094



Study Arm 468






    Intervention





    Routine
1.15 0.51, 2.56 0.7



Healthcare Facility Type 468






    Primary





    Secondary
2.37 0.78, 7.25 0.13



    Tertiary
1.58 0.55, 4.57 0.4



Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_two.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_two.docx") 

Table 2: MACE - Combined univariate & multivariate cox regression (ALL)

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  mutate(
    mace = case_when(
      include_exclude == "EXCLUDE" ~ 1, TRUE ~ mace), 
    mace_factor = factor(mace, levels = 0:1, labels = c("No", "Yes"))) %>%  
  filter(dura_mace != 0) %>% 
    select(
      -c(mace_factor, all_cause, mace_all_cause, all_cause_factor,
         mace_all_cause_factor, dura_all_cause, 
         dura_mace_all_cause, include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_mace, 
        event = df_temp1$mace)


tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(mace, dura_mace)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, a_income, tobacco_use, 
        ff_hba1c_0, hosp_cat) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: MACE - Univartiate and multivariate cox regression (ALL)") 

table_two 
Table 2: MACE - Univartiate and multivariate cox regression (ALL)
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 490 1.01 0.98, 1.03 0.5 377 1.02 0.99, 1.06 0.2
Gender 490


377


    Male



    Female
0.63 0.34, 1.17 0.14
0.64 0.29, 1.42 0.3
Level of Formal education 490






    None





    Primary
0.78 0.26, 2.41 0.7



    Secondary
1.42 0.48, 4.15 0.5



    Tertiary
1.27 0.39, 4.14 0.7



Marital Status 490






    Never Married





    Currently Married
1.22 0.29, 5.09 0.8



    Separated
0.98 0.16, 5.85 >0.9



    Widow/Widower
0.76 0.15, 3.94 0.7



    Cohabitating
2.98 0.42, 21.2 0.3



    Divorced
0.58 0.05, 6.36 0.7



Domicile 490






    Rural





    Semi-Urban
0.66 0.24, 1.79 0.4



    Urban
0.47 0.18, 1.23 0.12



Income Bracket 487


377


    0-100



    101-250
1.87 0.87, 4.04 0.11
1.37 0.52, 3.63 0.5
    251-500
2.59 1.19, 5.65 0.017
1.68 0.62, 4.53 0.3
    501-1500
0.00 0.00, Inf >0.9
0.00 0.00, Inf >0.9
    1501-3000
3.55 0.99, 12.7 0.052
1.30 0.15, 10.9 0.8
    > 3000
2.80 0.36, 21.7 0.3
2.39 0.27, 21.2 0.4
Religion 490






    Christianity





    Islam
1.78 0.83, 3.82 0.14



    Other
0.00 0.00, Inf >0.9



Type of Stroke 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
1.11 0.54, 2.27 0.8



    Ischemic With Hemorrhagic Transformation
0.00 0.00, Inf >0.9



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Type 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
1.14 0.56, 2.33 0.7



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 481 1.02 0.97, 1.07 0.5



Modified Ranking Score 489 0.95 0.75, 1.20 0.6



Hyperlipidemia 490






    No





    Yes
0.64 0.32, 1.25 0.2



Hypertesion 490






    No





    Yes
2.79 0.38, 20.2 0.3



Baseline SBP >= 160mmHg 490






    <160mmHg





    >=160mmHg
1.31 0.73, 2.35 0.4



Diabetes Mellitus 490






    No





    Yes
1.28 0.71, 2.32 0.4



Cigarette smoking 477


377


    No



    Yes
2.57 1.24, 5.33 0.011
2.28 0.91, 5.70 0.079
Overweight & obesity 425






    No





    Yes
1.00 0.52, 1.94 >0.9



Categorised BMI 425






    Normal





    Overweight
0.97 0.45, 2.12 >0.9



    Obese
1.03 0.46, 2.30 >0.9



HBA1C (Baseline) 386 1.17 1.04, 1.32 0.008 377 1.19 1.06, 1.34 0.004
High HbA1C 386






    No





    Yes
1.93 0.98, 3.80 0.057



Systolic Blood Pressure 490 1.01 0.99, 1.02 0.3



Diastolic Blood Pressure 490 1.01 0.99, 1.03 0.4



BB 490 1.07 0.46, 2.54 0.9



CCB 490 0.60 0.31, 1.13 0.11



ARB 490 0.55 0.30, 1.00 0.052



DIURETIC 490 1.18 0.62, 2.24 0.6



METHYLDOPA 490 0.92 0.28, 2.95 0.9



ACEI 490 1.50 0.77, 2.89 0.2



VASODILATOR 490 0.68 0.16, 2.81 0.6



ALPHA BLOCKER 490 0.00 0.00, Inf >0.9



Dose Index 432 0.89 0.56, 1.41 0.6



Antiplatelets 455






    FALSE





    TRUE
1.46 0.73, 2.93 0.3



Statins 456






    FALSE





    TRUE
1.46 0.61, 3.49 0.4



Total Hillbone Score 482 0.95 0.89, 1.01 0.10



Health Literacy in HPT/stroke 462 0.97 0.88, 1.06 0.5



Study Arm 490






    Intervention





    Routine
1.06 0.59, 1.89 0.8



Healthcare Facility Type 490


377


    Primary



    Secondary
2.31 0.94, 5.64 0.067
2.79 0.94, 8.25 0.063
    Tertiary
2.46 1.11, 5.44 0.027
2.24 0.81, 6.17 0.12
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_two_ALL.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_two_ALL.docx") 

Table 3: Selected multivarite cox regression

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 


tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression") 

table_three 
Table 3: Selected multivariate cox regression
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 321 1.50 1.02, 2.21 0.042 490 1.06 0.80, 1.41 0.7
Cigarette smoking 321


490


    No



    Yes
2.99 1.17, 7.68 0.023
2.23 1.03, 4.85 0.043
HBA1C (Baseline) 321 1.07 0.92, 1.25 0.4 490 1.15 1.02, 1.30 0.027
SBP < 160mmHg 321


490


    No



    Yes
1.58 0.70, 3.60 0.3
1.22 0.66, 2.27 0.5
Total Hillbone Score 321 0.95 0.87, 1.05 0.3 490 0.95 0.89, 1.02 0.2
Overweight & Obesity 321


490


    No



    Yes
1.34 0.57, 3.13 0.5
1.13 0.56, 2.27 0.7
Stroke Severity (NIHSS) 321 1.02 0.96, 1.09 0.5 490 1.02 0.96, 1.08 0.5
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three.docx")
[1] TRUE
Show the code
table_three %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three.docx") 

Table 3: Males

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_males <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (MALES)")

table_three_males 
Table 3: Selected multivariate cox regression (MALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 176 1.40 0.81, 2.41 0.2 277 0.96 0.67, 1.37 0.8
Cigarette smoking 176


277


    No



    Yes
2.89 0.99, 8.42 0.051
1.95 0.80, 4.73 0.13
HBA1C (Baseline) 176 1.13 0.93, 1.36 0.2 277 1.19 1.03, 1.39 0.025
SBP < 160mmHg 176


277


    No



    Yes
1.43 0.50, 4.06 0.5
1.12 0.51, 2.45 0.8
Total Hillbone Score 176 0.94 0.83, 1.05 0.3 277 0.96 0.88, 1.05 0.4
Overweight & Obesity 176


277


    No



    Yes
0.93 0.33, 2.63 0.9
0.70 0.29, 1.67 0.4
Stroke Severity (NIHSS) 176 1.08 1.00, 1.17 0.057 277 1.05 0.98, 1.12 0.14
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_males.docx")
[1] TRUE
Show the code
table_three_males %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_males.docx") 

Table 3: Females

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Female") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Female") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_females <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (FEMALES)")

table_three_females 
Table 3: Selected multivariate cox regression (FEMALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 145 2.17 1.08, 4.37 0.029 213 1.30 0.69, 2.46 0.4
Cigarette smoking 145


213


    No



    Yes
0.00 0.00, Inf >0.9
2.10 0.08, 54.2 0.6
HBA1C (Baseline) 145 1.01 0.75, 1.36 >0.9 213 1.17 0.88, 1.55 0.2
SBP < 160mmHg 145


213


    No



    Yes
2.56 0.62, 10.6 0.2
1.41 0.38, 5.23 0.6
Total Hillbone Score 145 1.02 0.86, 1.21 0.8 213 0.94 0.83, 1.07 0.3
Overweight & Obesity 145


213


    No



    Yes
2.24 0.24, 20.6 0.5
1.76 0.22, 13.9 0.5
Stroke Severity (NIHSS) 145 0.91 0.79, 1.06 0.2 213 0.97 0.85, 1.10 0.6
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_females.docx")
[1] TRUE
Show the code
table_three_females %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_females.docx") 

Table 3: PINGS = Intervention

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Intervention") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(arm == "Intervention") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_intervention <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (Intervention)")

table_three_intervention 
Table 3: Selected multivariate cox regression (Intervention)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 157 2.72 1.38, 5.36 0.004 239 1.53 0.94, 2.49 0.082
Cigarette smoking 157


239


    No



    Yes
1.97 0.48, 8.11 0.3
1.81 0.53, 6.18 0.3
HBA1C (Baseline) 157 1.22 1.03, 1.44 0.024 239 1.23 1.03, 1.47 0.027
SBP < 160mmHg 157


239


    No



    Yes
2.64 0.76, 9.12 0.13
1.34 0.50, 3.57 0.5
Total Hillbone Score 157 0.97 0.82, 1.15 0.7 239 0.98 0.86, 1.12 0.8
Overweight & Obesity 157


239


    No



    Yes
1.04 0.31, 3.52 >0.9
0.93 0.33, 2.67 0.9
Stroke Severity (NIHSS) 157 1.04 0.93, 1.17 0.5 239 1.01 0.91, 1.11 0.9
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_intervention.docx")
[1] TRUE
Show the code
table_three_intervention %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_intervention.docx") 

Table 3: PINGS = Routine

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Routine") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(arm == "Routine") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (Routine)")

table_three_routine 
Table 3: Selected multivariate cox regression (Routine)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 164 1.09 0.67, 1.77 0.7 251 0.81 0.55, 1.18 0.3
Cigarette smoking 164


251


    No



    Yes
2.94 0.76, 11.3 0.12
2.27 0.67, 7.65 0.2
HBA1C (Baseline) 164 0.77 0.46, 1.30 0.3 251 1.09 0.84, 1.42 0.5
SBP < 160mmHg 164


251


    No



    Yes
0.93 0.28, 3.02 >0.9
1.04 0.42, 2.61 >0.9
Total Hillbone Score 164 0.91 0.80, 1.04 0.2 251 0.93 0.86, 1.01 0.094
Overweight & Obesity 164


251


    No



    Yes
2.00 0.56, 7.13 0.3
1.21 0.42, 3.50 0.7
Stroke Severity (NIHSS) 164 1.03 0.94, 1.12 0.5 251 1.03 0.96, 1.11 0.4
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_Routine.docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_routine.docx") 

Table 3: Stroke Type = Ischemic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Ischemic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(d_st_type_2 == "Ischemic Stroke") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (Ischemic Stroke)")

table_three_routine 
Table 3: Selected multivariate cox regression (Ischemic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 230 1.55 0.95, 2.52 0.082 334 1.08 0.74, 1.58 0.7
Cigarette smoking 230


334


    No



    Yes
3.21 0.98, 10.5 0.054
1.90 0.67, 5.40 0.2
HBA1C (Baseline) 230 1.12 0.94, 1.32 0.2 334 1.20 1.03, 1.40 0.022
SBP < 160mmHg 230


334


    No



    Yes
1.42 0.50, 3.99 0.5
1.31 0.60, 2.89 0.5
Total Hillbone Score 230 0.94 0.82, 1.08 0.4 334 0.91 0.84, 0.99 0.034
Overweight & Obesity 230


334


    No



    Yes
1.45 0.49, 4.31 0.5
1.42 0.52, 3.88 0.5
Stroke Severity (NIHSS) 230 1.01 0.93, 1.10 0.8 334 1.02 0.95, 1.09 0.6
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_Routine (Ischemic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_routine (Ischemic Stroke).docx") 

Table 3: Stroke Type = Intracerebral Hemorrhagic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Intracerebral Hemorrhagic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace, dura_mace, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace, 
        event = df_for_tbl_three$mace)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(d_st_type_2 == "Intracerebral Hemorrhagic Stroke") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace, dura_mace, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace, time = dura_mace) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)")

table_three_routine 
Table 3: Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 53 1.19 0.33, 4.24 0.8 101 0.94 0.21, 4.15 0.9
Cigarette smoking 53


101


    No



    Yes
3.45 0.19, 63.7 0.4
2.24 0.05, 112 0.4
HBA1C (Baseline) 53 1.10 0.65, 1.83 0.7 101 1.13 0.51, 2.52 0.5
SBP < 160mmHg 53


101


    No



    Yes
0.80 0.10, 6.44 0.8
0.66 0.02, 18.3 0.6
Total Hillbone Score 53 0.89 0.74, 1.06 0.2 101 0.98 0.71, 1.35 0.8
Overweight & Obesity 53


101


    No



    Yes
3.29 0.19, 57.6 0.4
0.76 0.00, 132 0.8
Stroke Severity (NIHSS) 53 1.09 0.90, 1.31 0.4 101 1.03 0.76, 1.38 0.7
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE_table_three_Routine (Intracerebral Hemorrhagic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE_table_three_routine (Intracerebral Hemorrhagic Stroke).docx") 

ALL CAUSE MORTALITY

Table 1: ALL CAUSE - Descriptive statistics

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
    select(
      -c(mace, mace_factor, all_cause, mace_all_cause, 
         mace_all_cause_factor, dura_mace, 
         dura_mace_all_cause, include_exclude)) %>% 
    gtsummary::tbl_summary(by = all_cause_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**ALL CAUSE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by ALL CAUSE")

table_one 
Table 1: Distribution of covariate by ALL CAUSE
Characteristic
ALL CAUSE
p-value2
No
N = 4471
Yes
N = 261
Overall
N = 4731
Time to All Cause Mortality 365 (336, 365) 122 (68, 270) 365 (336, 365) <0.001
Age in years 58 (51, 66) 67 (54, 70) 58 (51, 67) 0.067
Gender


0.3
    Male 251 (56%) 12 (46%) 263 (56%)
    Female 196 (44%) 14 (54%) 210 (44%)
Level of Formal education


0.3
    None 44 (9.8%) 4 (15%) 48 (10%)
    Primary 186 (42%) 7 (27%) 193 (41%)
    Secondary 144 (32%) 9 (35%) 153 (32%)
    Tertiary 73 (16%) 6 (23%) 79 (17%)
Marital Status


0.5
    Never Married 21 (4.7%) 1 (3.8%) 22 (4.7%)
    Currently Married 293 (66%) 14 (54%) 307 (65%)
    Separated 35 (7.8%) 2 (7.7%) 37 (7.8%)
    Widow/Widower 72 (16%) 7 (27%) 79 (17%)
    Cohabitating 7 (1.6%) 0 (0%) 7 (1.5%)
    Divorced 19 (4.3%) 2 (7.7%) 21 (4.4%)
Domicile


0.4
    Rural 26 (5.8%) 2 (7.7%) 28 (5.9%)
    Semi-Urban 148 (33%) 11 (42%) 159 (34%)
    Urban 273 (61%) 13 (50%) 286 (60%)
Income Bracket


0.049
    0-100 159 (36%) 11 (44%) 170 (36%)
    101-250 135 (30%) 4 (16%) 139 (30%)
    251-500 94 (21%) 7 (28%) 101 (21%)
    501-1500 42 (9.4%) 0 (0%) 42 (8.9%)
    1501-3000 11 (2.5%) 2 (8.0%) 13 (2.8%)
    > 3000 4 (0.9%) 1 (4.0%) 5 (1.1%)
    Unknown 2 1 3
Religion


0.028
    Christianity 404 (90%) 20 (77%) 424 (90%)
    Islam 41 (9.2%) 5 (19%) 46 (9.7%)
    Other 2 (0.4%) 1 (3.8%) 3 (0.6%)
Type of Stroke


0.2
    Ischemic Stroke 298 (74%) 18 (78%) 316 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (13%) 95 (22%)
    Ischemic With Hemorrhagic Transformation 8 (2.0%) 2 (8.7%) 10 (2.3%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.2%)
    Unknown 44 3 47
Stroke Type


0.5
    Ischemic Stroke 306 (76%) 20 (87%) 326 (77%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (13%) 95 (22%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.2%)
    Unknown 44 3 47
Stroke Severity (NIHSS) 3.0 (0.0, 7.0) 8.0 (5.0, 14.0) 3.0 (0.0, 8.0) 0.001
    Unknown 10 1 11
Modified Ranking Score


0.002
    0 35 (7.9%) 4 (15%) 39 (8.3%)
    1 104 (23%) 3 (12%) 107 (23%)
    2 127 (29%) 1 (3.8%) 128 (27%)
    3 91 (20%) 7 (27%) 98 (21%)
    4 85 (19%) 10 (38%) 95 (20%)
    5 3 (0.7%) 1 (3.8%) 4 (0.8%)
    Unknown 2 0 2
Hyperlipidemia 146 (33%) 6 (23%) 152 (32%) 0.3
Hypertesion 420 (94%) 25 (96%) 445 (94%) >0.9
Baseline SBP >= 160mmHg


0.8
    <160mmHg 287 (64%) 16 (62%) 303 (64%)
    >=160mmHg 160 (36%) 10 (38%) 170 (36%)
Diabetes Mellitus 145 (32%) 13 (50%) 158 (33%) 0.065
Cigarette smoking 36 (8.3%) 6 (23%) 42 (9.1%) 0.023
    Unknown 13 0 13
Overweight & obesity 233 (60%) 16 (80%) 249 (61%) 0.068
    Unknown 56 6 62
Categorised BMI


0.030
    Normal 158 (40%) 4 (20%) 162 (39%)
    Overweight 124 (32%) 12 (60%) 136 (33%)
    Obese 109 (28%) 4 (20%) 113 (27%)
    Unknown 56 6 62
HBA1C (Baseline) 5.80 (5.40, 6.60) 6.40 (5.80, 9.30) 5.80 (5.40, 6.70) 0.005
    Unknown 93 5 98
High HbA1C 99 (28%) 10 (48%) 109 (29%) 0.054
    Unknown 93 5 98
Systolic Blood Pressure 154 (146, 168) 153 (145, 175) 154 (146, 168) >0.9
Diastolic Blood Pressure 94 (87, 102) 96 (84, 103) 94 (87, 102) 0.8
BB 61 (14%) 7 (27%) 68 (14%) 0.079
CCB 365 (82%) 20 (77%) 385 (81%) 0.6
ARB 244 (55%) 9 (35%) 253 (53%) 0.047
DIURETIC 126 (28%) 8 (31%) 134 (28%) 0.8
METHYLDOPA 36 (8.1%) 1 (3.8%) 37 (7.8%) 0.7
ACEI 85 (19%) 5 (19%) 90 (19%) >0.9
VASODILATOR 32 (7.2%) 2 (7.7%) 34 (7.2%) 0.7
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.92, 2.00) 1.33 (0.83, 1.83) >0.9
    Unknown 49 3 52
Antiplatelets 267 (64%) 17 (74%) 284 (64%) 0.3
    Unknown 29 3 32
Statins 324 (77%) 17 (74%) 341 (77%) 0.7
    Unknown 28 3 31
Total Hillbone Score 52.0 (50.0, 53.0) 52.0 (50.0, 53.0) 52.0 (50.0, 53.0) 0.3
    Unknown 7 1 8
Health Literacy in HPT/stroke 9 (6, 10) 7 (4, 10) 8 (6, 10) 0.2
    Unknown 28 1 29
Study Arm


0.6
    Intervention 216 (48%) 14 (54%) 230 (49%)
    Routine 231 (52%) 12 (46%) 243 (51%)
Healthcare Facility Type


0.2
    Primary 136 (30%) 7 (27%) 143 (30%)
    Secondary 102 (23%) 10 (38%) 112 (24%)
    Tertiary 209 (47%) 9 (35%) 218 (46%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_one.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_one.docx") 

Table 1: ALL CAUSE - Descriptive statistics (All data)

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  mutate(
    all_cause = case_when(
      include_exclude == "EXCLUDE" ~ 1, TRUE ~ all_cause), 
    all_cause_factor = factor(
      all_cause, levels = 0:1, labels = c("No", "Yes"))) %>% 
    select(
      -c(mace, mace_factor, all_cause, mace_all_cause,
         mace_all_cause_factor, dura_mace, 
         dura_mace_all_cause, include_exclude)) %>% 
    gtsummary::tbl_summary(by = all_cause_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**ALL CAUSE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by ALL CAUSE (Added Cases)")

table_one 
Table 1: Distribution of covariate by ALL CAUSE (Added Cases)
Characteristic
ALL CAUSE
p-value2
No
N = 4471
Yes
N = 531
Overall
N = 5001
Time to All Cause Mortality 365 (336, 365) 183 (68, 365) 365 (336, 365) <0.001
Age in years 58 (51, 66) 64 (50, 69) 58 (51, 67) 0.2
Gender


>0.9
    Male 251 (56%) 30 (57%) 281 (56%)
    Female 196 (44%) 23 (43%) 219 (44%)
Level of Formal education


0.6
    None 44 (9.8%) 5 (9.4%) 49 (9.8%)
    Primary 186 (42%) 17 (32%) 203 (41%)
    Secondary 144 (32%) 21 (40%) 165 (33%)
    Tertiary 73 (16%) 10 (19%) 83 (17%)
Marital Status


0.8
    Never Married 21 (4.7%) 2 (3.8%) 23 (4.6%)
    Currently Married 293 (66%) 32 (60%) 325 (65%)
    Separated 35 (7.8%) 3 (5.7%) 38 (7.6%)
    Widow/Widower 72 (16%) 12 (23%) 84 (17%)
    Cohabitating 7 (1.6%) 1 (1.9%) 8 (1.6%)
    Divorced 19 (4.3%) 3 (5.7%) 22 (4.4%)
Domicile


0.12
    Rural 26 (5.8%) 7 (13%) 33 (6.6%)
    Semi-Urban 148 (33%) 18 (34%) 166 (33%)
    Urban 273 (61%) 28 (53%) 301 (60%)
Income Bracket


0.024
    0-100 159 (36%) 15 (29%) 174 (35%)
    101-250 135 (30%) 15 (29%) 150 (30%)
    251-500 94 (21%) 15 (29%) 109 (22%)
    501-1500 42 (9.4%) 1 (1.9%) 43 (8.7%)
    1501-3000 11 (2.5%) 4 (7.7%) 15 (3.0%)
    > 3000 4 (0.9%) 2 (3.8%) 6 (1.2%)
    Unknown 2 1 3
Religion


0.12
    Christianity 404 (90%) 44 (83%) 448 (90%)
    Islam 41 (9.2%) 8 (15%) 49 (9.8%)
    Other 2 (0.4%) 1 (1.9%) 3 (0.6%)
Type of Stroke


0.7
    Ischemic Stroke 298 (74%) 34 (72%) 332 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (23%) 103 (23%)
    Ischemic With Hemorrhagic Transformation 8 (2.0%) 2 (4.3%) 10 (2.2%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.1%)
    Unknown 44 6 50
Stroke Type


>0.9
    Ischemic Stroke 306 (76%) 36 (77%) 342 (76%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (23%) 103 (23%)
    Untyped Stroke (no CT scan available) 5 (1.2%) 0 (0%) 5 (1.1%)
    Unknown 44 6 50
Stroke Severity (NIHSS) 3.0 (0.0, 7.0) 2.0 (0.0, 9.0) 3.0 (0.0, 8.0) 0.8
    Unknown 10 3 13
Modified Ranking Score


0.2
    0 35 (7.9%) 7 (13%) 42 (8.5%)
    1 104 (23%) 14 (27%) 118 (24%)
    2 127 (29%) 9 (17%) 136 (27%)
    3 91 (20%) 9 (17%) 100 (20%)
    4 85 (19%) 12 (23%) 97 (20%)
    5 3 (0.7%) 1 (1.9%) 4 (0.8%)
    Unknown 2 1 3
Hyperlipidemia 146 (33%) 14 (26%) 160 (32%) 0.4
Hypertesion 420 (94%) 49 (92%) 469 (94%) 0.6
Baseline SBP >= 160mmHg


0.6
    <160mmHg 287 (64%) 36 (68%) 323 (65%)
    >=160mmHg 160 (36%) 17 (32%) 177 (35%)
Diabetes Mellitus 145 (32%) 24 (45%) 169 (34%) 0.062
Cigarette smoking 36 (8.3%) 9 (17%) 45 (9.3%) 0.043
    Unknown 13 1 14
Overweight & obesity 233 (60%) 25 (63%) 258 (60%) 0.7
    Unknown 56 13 69
Categorised BMI


0.5
    Normal 158 (40%) 15 (38%) 173 (40%)
    Overweight 124 (32%) 16 (40%) 140 (32%)
    Obese 109 (28%) 9 (23%) 118 (27%)
    Unknown 56 13 69
HBA1C (Baseline) 5.80 (5.40, 6.60) 6.55 (5.70, 9.60) 5.80 (5.40, 6.70) 0.001
    Unknown 93 15 108
High HbA1C 99 (28%) 19 (50%) 118 (30%) 0.005
    Unknown 93 15 108
Systolic Blood Pressure 154 (146, 168) 153 (145, 165) 153 (145, 168) 0.6
Diastolic Blood Pressure 94 (87, 102) 97 (85, 102) 94 (87, 102) 0.7
BB 61 (14%) 9 (17%) 70 (14%) 0.5
CCB 365 (82%) 36 (68%) 401 (80%) 0.018
ARB 244 (55%) 19 (36%) 263 (53%) 0.010
DIURETIC 126 (28%) 13 (25%) 139 (28%) 0.6
METHYLDOPA 36 (8.1%) 2 (3.8%) 38 (7.6%) 0.4
ACEI 85 (19%) 9 (17%) 94 (19%) 0.7
VASODILATOR 32 (7.2%) 3 (5.7%) 35 (7.0%) >0.9
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.83, 1.67) 1.33 (0.83, 1.83) 0.6
    Unknown 49 12 61
Antiplatelets 267 (64%) 32 (70%) 299 (64%) 0.4
    Unknown 29 7 36
Statins 324 (77%) 38 (83%) 362 (78%) 0.4
    Unknown 28 7 35
Total Hillbone Score 52.0 (50.0, 53.0) 52.0 (48.0, 53.0) 52.0 (50.0, 53.0) 0.11
    Unknown 7 2 9
Health Literacy in HPT/stroke 9 (6, 10) 7 (5, 11) 8 (6, 10) 0.7
    Unknown 28 2 30
Study Arm


0.5
    Intervention 216 (48%) 28 (53%) 244 (49%)
    Routine 231 (52%) 25 (47%) 256 (51%)
Healthcare Facility Type


0.3
    Primary 136 (30%) 12 (23%) 148 (30%)
    Secondary 102 (23%) 17 (32%) 119 (24%)
    Tertiary 209 (47%) 24 (45%) 233 (47%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_one_ALL.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_one_ALL.docx") 

Table 2: ALL CAUSE - Combined univariate & multivariate cox regression

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
  filter(dura_all_cause != 0) %>% 
    select(
      -c(mace, mace_factor, dura_mace, mace_all_cause, 
         mace_all_cause_factor, dura_mace_all_cause, 
         all_cause_factor, include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_all_cause, 
        event = df_temp1$all_cause)


tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(all_cause, dura_all_cause)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, d_st_type, nihss_scale, ranking, 
        tobacco_use, bmi_cat, ff_hba1c_0, BB) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::add_global_p() %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()

 
table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: ALL CAUSE - Univartiate and multivariate cox regression") 

table_two 
Table 2: ALL CAUSE - Univartiate and multivariate cox regression
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 468 1.03 1.00, 1.07 0.079 281 1.04 0.98, 1.09 0.2
Gender 468


281

0.9
    Male



    Female
1.48 0.68, 3.19 0.3
0.89 0.26, 3.00
Level of Formal education 468






    None





    Primary
0.42 0.12, 1.43 0.2



    Secondary
0.65 0.20, 2.10 0.5



    Tertiary
0.87 0.24, 3.07 0.8



Marital Status 468






    Never Married





    Currently Married
1.03 0.14, 7.85 >0.9



    Separated
1.25 0.11, 13.8 0.9



    Widow/Widower
2.10 0.26, 17.0 0.5



    Cohabitating
0.00 0.00, Inf >0.9



    Divorced
2.23 0.20, 24.6 0.5



Domicile 468






    Rural





    Semi-Urban
1.02 0.23, 4.60 >0.9



    Urban
0.63 0.14, 2.78 0.5



Income Bracket 465






    0-100





    101-250
0.44 0.14, 1.39 0.2



    251-500
1.11 0.43, 2.87 0.8



    501-1500
0.00 0.00, Inf >0.9



    1501-3000
2.67 0.59, 12.1 0.2



    > 3000
2.97 0.38, 23.0 0.3



Religion 468






    Christianity





    Islam
2.25 0.84, 6.00 0.10



    Other
7.24 0.97, 54.0 0.054



Type of Stroke 421


281

0.5
    Ischemic Stroke



    Intracerebral Hemorrhagic Stroke
0.57 0.17, 1.93 0.4
1.16 0.23, 5.83
    Ischemic With Hemorrhagic Transformation
4.96 1.15, 21.4 0.032
10.7 1.00, 115
    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9
0.00 0.00, Inf
Stroke Type 421






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.52 0.16, 1.76 0.3



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 460 1.13 1.07, 1.20 <0.001 281 1.16 1.03, 1.29 0.008
Modified Ranking Score 467 1.40 1.01, 1.93 0.044 281 0.74 0.40, 1.37 0.3
Hyperlipidemia 468






    No





    Yes
0.63 0.25, 1.56 0.3



Hypertesion 468






    No





    Yes
1.57 0.21, 11.6 0.7



Baseline SBP >= 160mmHg 468






    <160mmHg





    >=160mmHg
1.13 0.51, 2.48 0.8



Diabetes Mellitus 468






    No





    Yes
1.98 0.92, 4.27 0.081



Cigarette smoking 456


281

0.2
    No



    Yes
3.05 1.22, 7.59 0.017
3.37 0.70, 16.3
Overweight & obesity 409






    No





    Yes
2.72 0.91, 8.14 0.073



Categorised BMI 409


281

0.010
    Normal



    Overweight
3.76 1.21, 11.7 0.022
8.38 1.61, 43.6
    Obese
1.49 0.37, 5.94 0.6
3.00 0.43, 20.7
HBA1C (Baseline) 372 1.22 1.06, 1.40 0.006 281 1.08 0.87, 1.34 0.5
High HbA1C 372






    No





    Yes
2.21 0.94, 5.20 0.070



Systolic Blood Pressure 468 1.01 0.99, 1.03 0.6



Diastolic Blood Pressure 468 0.99 0.97, 1.02 0.7



BB 468 2.40 1.01, 5.71 0.048 281 3.33 0.87, 12.8 0.10
CCB 468 0.75 0.30, 1.86 0.5



ARB 468 0.47 0.21, 1.05 0.065



DIURETIC 468 1.20 0.52, 2.76 0.7



METHYLDOPA 468 0.49 0.07, 3.63 0.5



ACEI 468 1.02 0.38, 2.70 >0.9



VASODILATOR 468 1.11 0.26, 4.70 0.9



ALPHA BLOCKER 468 0.00 0.00, Inf >0.9



Dose Index 417 1.05 0.62, 1.80 0.8



Antiplatelets 436






    FALSE





    TRUE
1.59 0.63, 4.03 0.3



Statins 437






    FALSE





    TRUE
0.84 0.33, 2.13 0.7



Total Hillbone Score 461 0.97 0.89, 1.06 0.6



Health Literacy in HPT/stroke 440 0.91 0.81, 1.02 0.10



Study Arm 468






    Intervention





    Routine
0.82 0.38, 1.78 0.6



Healthcare Facility Type 468






    Primary





    Secondary
2.08 0.79, 5.46 0.14



    Tertiary
0.88 0.33, 2.37 0.8



Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_two.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_two.docx") 

Table 2: ALL CAUSE - Combined univariate & multivariate cox regression (ALL)

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  mutate(
    all_cause = case_when(
      include_exclude == "EXCLUDE" ~ 1, TRUE ~ all_cause), 
    all_cause_factor = factor(all_cause, levels = 0:1, labels = c("No", "Yes"))) %>%  
  filter(dura_all_cause != 0) %>% 
    select(
      -c(mace, mace_factor, dura_mace,
         all_cause_factor,
         mace_all_cause, mace_all_cause_factor, dura_mace_all_cause, 
         include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_all_cause, 
        event = df_temp1$all_cause)


tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(all_cause, dura_all_cause)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, a_income, tobacco_use, 
        ff_hba1c_0, ARB) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: ALL CAUSE - Univartiate and multivariate cox regression (ALL)") 

table_two 
Table 2: ALL CAUSE - Univartiate and multivariate cox regression (ALL)
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 490 1.01 0.99, 1.04 0.3 377 1.01 0.97, 1.04 0.7
Gender 490


377


    Male



    Female
0.86 0.48, 1.53 0.6
0.74 0.34, 1.61 0.5
Level of Formal education 490






    None





    Primary
0.72 0.26, 1.98 0.5



    Secondary
1.01 0.38, 2.72 >0.9



    Tertiary
1.12 0.38, 3.28 0.8



Marital Status 490






    Never Married





    Currently Married
1.11 0.26, 4.63 0.9



    Separated
0.97 0.16, 5.84 >0.9



    Widow/Widower
1.38 0.30, 6.38 0.7



    Cohabitating
1.44 0.13, 15.9 0.8



    Divorced
1.72 0.29, 10.3 0.6



Domicile 490






    Rural





    Semi-Urban
0.72 0.27, 1.94 0.5



    Urban
0.50 0.19, 1.32 0.2



Income Bracket 487


377


    0-100



    101-250
1.17 0.55, 2.48 0.7
0.84 0.36, 1.94 0.7
    251-500
1.84 0.87, 3.86 0.11
1.06 0.44, 2.55 0.9
    501-1500
0.00 0.00, Inf >0.9
0.00 0.00, Inf >0.9
    1501-3000
3.79 1.25, 11.5 0.019
0.97 0.12, 7.71 >0.9
    > 3000
4.50 1.02, 19.8 0.047
9.27 1.91, 45.0 0.006
Religion 490






    Christianity





    Islam
1.76 0.82, 3.76 0.15



    Other
4.49 0.62, 32.8 0.14



Type of Stroke 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
1.11 0.54, 2.27 0.8



    Ischemic With Hemorrhagic Transformation
2.94 0.70, 12.3 0.14



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Type 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
1.07 0.52, 2.17 0.9



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 481 1.04 0.99, 1.09 0.13



Modified Ranking Score 489 1.04 0.83, 1.31 0.7



Hyperlipidemia 490






    No





    Yes
0.68 0.36, 1.31 0.3



Hypertesion 490






    No





    Yes
1.42 0.34, 5.84 0.6



Baseline SBP >= 160mmHg 490






    <160mmHg





    >=160mmHg
1.00 0.56, 1.81 >0.9



Diabetes Mellitus 490






    No





    Yes
1.69 0.96, 2.98 0.071



Cigarette smoking 477


377


    No



    Yes
2.43 1.18, 5.03 0.017
1.66 0.61, 4.53 0.3
Overweight & obesity 425






    No





    Yes
1.00 0.52, 1.94 >0.9



Categorised BMI 425






    Normal





    Overweight
1.24 0.60, 2.57 0.6



    Obese
0.72 0.29, 1.77 0.5



HBA1C (Baseline) 386 1.20 1.07, 1.34 0.001 377 1.24 1.11, 1.40 <0.001
High HbA1C 386






    No





    Yes
2.29 1.18, 4.44 0.014



Systolic Blood Pressure 490 1.00 0.99, 1.02 0.6



Diastolic Blood Pressure 490 1.01 0.99, 1.03 0.6



BB 490 1.62 0.79, 3.36 0.2



CCB 490 0.58 0.31, 1.08 0.083



ARB 490 0.52 0.29, 0.93 0.028 377 0.31 0.15, 0.66 0.003
DIURETIC 490 1.09 0.57, 2.06 0.8



METHYLDOPA 490 0.56 0.14, 2.32 0.4



ACEI 490 0.98 0.47, 2.01 >0.9



VASODILATOR 490 0.98 0.30, 3.15 >0.9



ALPHA BLOCKER 490 0.00 0.00, Inf >0.9



Dose Index 432 1.02 0.66, 1.56 >0.9



Antiplatelets 455






    FALSE





    TRUE
1.14 0.60, 2.17 0.7



Statins 456






    FALSE





    TRUE
1.13 0.52, 2.44 0.8



Total Hillbone Score 482 0.99 0.92, 1.06 0.7



Health Literacy in HPT/stroke 462 0.96 0.88, 1.06 0.4



Study Arm 490






    Intervention





    Routine
0.89 0.50, 1.56 0.7



Healthcare Facility Type 490






    Primary





    Secondary
2.13 0.95, 4.80 0.068



    Tertiary
1.75 0.83, 3.66 0.14



Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_two_ALL.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_two_ALL.docx") 

Table 3: ALL CAUSE - Selected multivarite cox regression

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 


tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: ALL CAUSE - Selected multivariate cox regression") 

table_three 
Table 3: ALL CAUSE - Selected multivariate cox regression
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 321 1.26 0.87, 1.82 0.2 490 1.07 0.81, 1.41 0.6
Cigarette smoking 321


490


    No



    Yes
2.34 0.84, 6.49 0.10
2.06 0.94, 4.50 0.070
HBA1C (Baseline) 321 1.12 0.97, 1.30 0.13 490 1.19 1.06, 1.34 0.005
SBP < 160mmHg 321


490


    No



    Yes
1.42 0.63, 3.19 0.4
0.99 0.53, 1.84 >0.9
Total Hillbone Score 321 0.97 0.88, 1.08 0.6 490 0.99 0.92, 1.07 0.8
Overweight & Obesity 321


490


    No



    Yes
1.58 0.67, 3.74 0.3
1.16 0.59, 2.28 0.7
Stroke Severity (NIHSS) 321 1.05 0.99, 1.12 0.094 490 1.04 0.98, 1.09 0.2
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three.docx")
[1] TRUE
Show the code
table_three %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three.docx") 

Table 3: ALL CAUSE - Males

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_males <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (MALES)")

table_three_males 
Table 3: Selected multivariate cox regression (MALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 176 1.20 0.69, 2.08 0.5 277 0.96 0.67, 1.37 0.8
Cigarette smoking 176


277


    No



    Yes
2.75 0.83, 9.10 0.10
2.26 0.91, 5.61 0.076
HBA1C (Baseline) 176 1.16 0.95, 1.41 0.2 277 1.21 1.04, 1.40 0.014
SBP < 160mmHg 176


277


    No



    Yes
1.01 0.32, 3.16 >0.9
0.76 0.32, 1.80 0.5
Total Hillbone Score 176 0.98 0.84, 1.13 0.8 277 1.03 0.92, 1.16 0.6
Overweight & Obesity 176


277


    No



    Yes
1.22 0.40, 3.72 0.7
0.80 0.30, 2.13 0.6
Stroke Severity (NIHSS) 176 1.09 1.00, 1.18 0.052 277 1.05 0.97, 1.13 0.2
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_males.docx")
[1] TRUE
Show the code
table_three_males %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_males.docx") 

Table 3: Females

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Female") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Female") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_females <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (FEMALES)")

table_three_females 
Table 3: Selected multivariate cox regression (FEMALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 145 1.47 0.83, 2.61 0.2 213 1.28 0.78, 2.12 0.3
Cigarette smoking 145


213


    No



    Yes
0.00 0.00, Inf >0.9
1.69 0.11, 27.4 0.7
HBA1C (Baseline) 145 1.12 0.88, 1.42 0.4 213 1.16 0.93, 1.44 0.2
SBP < 160mmHg 145


213


    No



    Yes
2.47 0.70, 8.72 0.2
1.33 0.46, 3.88 0.6
Total Hillbone Score 145 1.01 0.86, 1.18 >0.9 213 0.95 0.85, 1.07 0.4
Overweight & Obesity 145


213


    No



    Yes
1.60 0.30, 8.48 0.6
1.46 0.29, 7.34 0.6
Stroke Severity (NIHSS) 145 1.01 0.91, 1.11 >0.9 213 1.03 0.94, 1.13 0.5
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_females.docx")
[1] TRUE
Show the code
table_three_females %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_females.docx") 

Table 3: ALL CAUSE: PINGS = Intervention

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Intervention") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(arm == "Intervention") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_intervention <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Allcaise Selected multivariate cox regression (Intervention)")

table_three_intervention 
Table 3: Allcaise Selected multivariate cox regression (Intervention)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 157 1.50 0.84, 2.69 0.2 239 1.37 0.89, 2.12 0.14
Cigarette smoking 157


239


    No



    Yes
0.88 0.17, 4.61 0.9
1.68 0.52, 5.39 0.4
HBA1C (Baseline) 157 1.25 1.05, 1.49 0.011 239 1.21 1.04, 1.42 0.021
SBP < 160mmHg 157


239


    No



    Yes
2.18 0.69, 6.85 0.2
1.10 0.44, 2.74 0.8
Total Hillbone Score 157 1.03 0.87, 1.22 0.7 239 1.02 0.90, 1.17 0.7
Overweight & Obesity 157


239


    No



    Yes
1.51 0.43, 5.26 0.5
1.09 0.41, 2.84 0.9
Stroke Severity (NIHSS) 157 1.06 0.96, 1.17 0.2 239 1.04 0.95, 1.13 0.4
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_intervention.docx")
[1] TRUE
Show the code
table_three_intervention %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_intervention.docx") 

Table 3: ALL CAUSE - PINGS = Routine

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Routine") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(arm == "Routine") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: ALL ACUSE Selected multivariate cox regression (Routine)")

table_three_routine 
Table 3: ALL ACUSE Selected multivariate cox regression (Routine)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 164 1.13 0.68, 1.87 0.6 251 0.88 0.60, 1.29 0.5
Cigarette smoking 164


251


    No



    Yes
3.61 0.88, 14.9 0.075
2.76 0.81, 9.41 0.10
HBA1C (Baseline) 164 0.87 0.55, 1.38 0.6 251 1.12 0.88, 1.44 0.3
SBP < 160mmHg 164


251


    No



    Yes
0.88 0.26, 3.04 0.8
0.82 0.31, 2.16 0.7
Total Hillbone Score 164 0.92 0.80, 1.05 0.2 251 0.97 0.88, 1.07 0.6
Overweight & Obesity 164


251


    No



    Yes
1.83 0.51, 6.64 0.4
1.11 0.29, 4.32 0.9
Stroke Severity (NIHSS) 164 1.05 0.97, 1.15 0.2 251 1.04 0.97, 1.12 0.2
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_Routine.docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_routine.docx") 

Table 3: Stroke Type = Ischemic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Ischemic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(d_st_type_2 == "Ischemic Stroke") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: ALL_Cause Selected multivariate cox regression (Ischemic Stroke)")

table_three_routine 
Table 3: ALL_Cause Selected multivariate cox regression (Ischemic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 230 1.24 0.78, 1.95 0.4 334 1.13 0.79, 1.61 0.5
Cigarette smoking 230


334


    No



    Yes
1.92 0.49, 7.54 0.3
1.79 0.65, 4.96 0.2
HBA1C (Baseline) 230 1.19 1.01, 1.39 0.038 334 1.22 1.07, 1.40 0.005
SBP < 160mmHg 230


334


    No



    Yes
1.09 0.40, 3.02 0.9
0.92 0.42, 2.02 0.8
Total Hillbone Score 230 0.98 0.85, 1.13 0.8 334 0.97 0.89, 1.07 0.5
Overweight & Obesity 230


334


    No



    Yes
1.59 0.55, 4.60 0.4
1.34 0.54, 3.33 0.5
Stroke Severity (NIHSS) 230 1.05 0.97, 1.13 0.2 334 1.04 0.98, 1.11 0.2
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_Routine (Ischemic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_routine (Ischemic Stroke).docx") 

Table 3: Stroke Type = Intracerebral Hemorrhagic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Intracerebral Hemorrhagic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, all_cause, dura_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_all_cause, 
        event = df_for_tbl_three$all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(d_st_type_2 == "Intracerebral Hemorrhagic Stroke") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, all_cause, dura_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = all_cause, time = dura_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: All Cause Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)")

table_three_routine 
Table 3: All Cause Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 53 1.19 0.33, 4.24 0.8 101 0.94 0.21, 4.15 0.9
Cigarette smoking 53


101


    No



    Yes
3.45 0.19, 63.7 0.4
2.24 0.05, 112 0.4
HBA1C (Baseline) 53 1.10 0.65, 1.83 0.7 101 1.13 0.51, 2.52 0.5
SBP < 160mmHg 53


101


    No



    Yes
0.80 0.10, 6.44 0.8
0.66 0.02, 18.3 0.6
Total Hillbone Score 53 0.89 0.74, 1.06 0.2 101 0.98 0.71, 1.35 0.8
Overweight & Obesity 53


101


    No



    Yes
3.29 0.19, 57.6 0.4
0.76 0.00, 132 0.8
Stroke Severity (NIHSS) 53 1.09 0.90, 1.31 0.4 101 1.03 0.76, 1.38 0.7
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/ALL_CAUSE_table_three_Routine (Intracerebral Hemorrhagic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/ALL_CAUSE_table_three_routine (Intracerebral Hemorrhagic Stroke).docx") 

COMBINED ALL CAUSE MORTALITY & MACE

Table 1: MACE AND ALL CAUSE - Descriptive statistics

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
    select(
      -c(mace, mace_factor, dura_mace,
         all_cause, all_cause_factor, dura_all_cause,
         mace_all_cause, dura_mace_all_cause, 
         include_exclude)) %>% 
    gtsummary::tbl_summary(by = mace_all_cause_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MACE and ALL CAUSE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by MACE and ALL CAUSE")

table_one 
Table 1: Distribution of covariate by MACE and ALL CAUSE
Characteristic
MACE and ALL CAUSE
p-value2
No
N = 4381
Yes
N = 351
Overall
N = 4731
Age in years 58 (51, 66) 65 (54, 70) 58 (51, 67) 0.044
Gender


0.4
    Male 246 (56%) 17 (49%) 263 (56%)
    Female 192 (44%) 18 (51%) 210 (44%)
Level of Formal education


0.2
    None 44 (10%) 4 (11%) 48 (10%)
    Primary 184 (42%) 9 (26%) 193 (41%)
    Secondary 138 (32%) 15 (43%) 153 (32%)
    Tertiary 72 (16%) 7 (20%) 79 (17%)
Marital Status


0.6
    Never Married 21 (4.8%) 1 (2.9%) 22 (4.7%)
    Currently Married 287 (66%) 20 (57%) 307 (65%)
    Separated 34 (7.8%) 3 (8.6%) 37 (7.8%)
    Widow/Widower 71 (16%) 8 (23%) 79 (17%)
    Cohabitating 6 (1.4%) 1 (2.9%) 7 (1.5%)
    Divorced 19 (4.3%) 2 (5.7%) 21 (4.4%)
Domicile


0.5
    Rural 25 (5.7%) 3 (8.6%) 28 (5.9%)
    Semi-Urban 146 (33%) 13 (37%) 159 (34%)
    Urban 267 (61%) 19 (54%) 286 (60%)
Income Bracket


0.11
    0-100 156 (36%) 14 (41%) 170 (36%)
    101-250 131 (30%) 8 (24%) 139 (30%)
    251-500 92 (21%) 9 (26%) 101 (21%)
    501-1500 42 (9.6%) 0 (0%) 42 (8.9%)
    1501-3000 11 (2.5%) 2 (5.9%) 13 (2.8%)
    > 3000 4 (0.9%) 1 (2.9%) 5 (1.1%)
    Unknown 2 1 3
Religion


0.14
    Christianity 395 (90%) 29 (83%) 424 (90%)
    Islam 41 (9.4%) 5 (14%) 46 (9.7%)
    Other 2 (0.5%) 1 (2.9%) 3 (0.6%)
Type of Stroke


0.12
    Ischemic Stroke 290 (73%) 26 (84%) 316 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (9.7%) 95 (22%)
    Ischemic With Hemorrhagic Transformation 8 (2.0%) 2 (6.5%) 10 (2.3%)
    Untyped Stroke (no CT scan available) 5 (1.3%) 0 (0%) 5 (1.2%)
    Unknown 43 4 47
Stroke Type


0.2
    Ischemic Stroke 298 (75%) 28 (90%) 326 (77%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 3 (9.7%) 95 (22%)
    Untyped Stroke (no CT scan available) 5 (1.3%) 0 (0%) 5 (1.2%)
    Unknown 43 4 47
Stroke Severity (NIHSS) 3.0 (0.0, 7.0) 8.0 (1.0, 13.0) 3.0 (0.0, 8.0) 0.002
    Unknown 10 1 11
Modified Ranking Score


0.003
    0 34 (7.8%) 5 (14%) 39 (8.3%)
    1 103 (24%) 4 (11%) 107 (23%)
    2 124 (28%) 4 (11%) 128 (27%)
    3 89 (20%) 9 (26%) 98 (21%)
    4 84 (19%) 11 (31%) 95 (20%)
    5 2 (0.5%) 2 (5.7%) 4 (0.8%)
    Unknown 2 0 2
Hyperlipidemia 145 (33%) 7 (20%) 152 (32%) 0.11
Hypertesion 411 (94%) 34 (97%) 445 (94%) 0.7
Baseline SBP >= 160mmHg


0.6
    <160mmHg 282 (64%) 21 (60%) 303 (64%)
    >=160mmHg 156 (36%) 14 (40%) 170 (36%)
Diabetes Mellitus 142 (32%) 16 (46%) 158 (33%) 0.11
Cigarette smoking 35 (8.2%) 7 (20%) 42 (9.1%) 0.030
    Unknown 13 0 13
Overweight & obesity 227 (59%) 22 (76%) 249 (61%) 0.081
    Unknown 56 6 62
Categorised BMI


0.13
    Normal 155 (41%) 7 (24%) 162 (39%)
    Overweight 122 (32%) 14 (48%) 136 (33%)
    Obese 105 (27%) 8 (28%) 113 (27%)
    Unknown 56 6 62
HBA1C (Baseline) 5.80 (5.40, 6.60) 6.30 (5.70, 8.85) 5.80 (5.40, 6.70) 0.022
    Unknown 91 7 98
High HbA1C 97 (28%) 12 (43%) 109 (29%) 0.095
    Unknown 91 7 98
Systolic Blood Pressure 153 (146, 168) 154 (145, 173) 154 (146, 168) 0.7
Diastolic Blood Pressure 94 (87, 102) 93 (84, 103) 94 (87, 102) 0.7
BB 60 (14%) 8 (23%) 68 (14%) 0.14
CCB 358 (82%) 27 (77%) 385 (81%) 0.5
ARB 240 (55%) 13 (37%) 253 (53%) 0.044
DIURETIC 123 (28%) 11 (31%) 134 (28%) 0.7
METHYLDOPA 35 (8.0%) 2 (5.7%) 37 (7.8%) >0.9
ACEI 82 (19%) 8 (23%) 90 (19%) 0.5
VASODILATOR 32 (7.3%) 2 (5.7%) 34 (7.2%) >0.9
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.83, 1.83) 1.33 (0.83, 1.83) 0.7
    Unknown 47 5 52
Antiplatelets 261 (64%) 23 (77%) 284 (64%) 0.15
    Unknown 27 5 32
Statins 318 (77%) 23 (79%) 341 (77%) 0.8
    Unknown 25 6 31
Total Hillbone Score 52.0 (50.0, 53.0) 52.0 (48.0, 53.0) 52.0 (50.0, 53.0) 0.2
    Unknown 7 1 8
Health Literacy in HPT/stroke 9 (6, 10) 7 (4, 9) 8 (6, 10) 0.2
    Unknown 28 1 29
Study Arm


0.7
    Intervention 212 (48%) 18 (51%) 230 (49%)
    Routine 226 (52%) 17 (49%) 243 (51%)
Healthcare Facility Type


0.3
    Primary 135 (31%) 8 (23%) 143 (30%)
    Secondary 100 (23%) 12 (34%) 112 (24%)
    Tertiary 203 (46%) 15 (43%) 218 (46%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_one.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_one.docx") 

Table 1: ALL CAUSE - Descriptive statistics (All data)

Show the code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()

table_one <- 
  df_for_mace_paper %>%
  mutate(
    mace_all_cause = case_when(
      include_exclude == "EXCLUDE" ~ 1, 
      TRUE ~ mace_all_cause), 
    mace_all_cause_factor = factor(
      mace_all_cause, levels = 0:1, 
      labels = c("No", "Yes"))) %>% 
    select(
      -c(mace, mace_factor, dura_mace, 
         all_cause, all_cause_factor, dura_all_cause, 
         mace_all_cause,  
         include_exclude)) %>% 
    gtsummary::tbl_summary(by = mace_all_cause_factor) %>% 
    gtsummary::add_overall(last = T) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::add_p() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MACE and ALL CAUSE**")%>% 
    gtsummary::modify_caption(
        caption = "**Table 1**: Distribution of covariate by MACE and ALL CAUSE (Added Cases)")

table_one 
Table 1: Distribution of covariate by MACE and ALL CAUSE (Added Cases)
Characteristic
MACE and ALL CAUSE
p-value2
No
N = 4381
Yes
N = 621
Overall
N = 5001
Time to MACE/Mortality 365 (336, 365) 229 (77, 365) 365 (336, 365) <0.001
Age in years 58 (51, 66) 63 (50, 69) 58 (51, 67) 0.14
Gender


>0.9
    Male 246 (56%) 35 (56%) 281 (56%)
    Female 192 (44%) 27 (44%) 219 (44%)
Level of Formal education


0.2
    None 44 (10%) 5 (8.1%) 49 (9.8%)
    Primary 184 (42%) 19 (31%) 203 (41%)
    Secondary 138 (32%) 27 (44%) 165 (33%)
    Tertiary 72 (16%) 11 (18%) 83 (17%)
Marital Status


0.7
    Never Married 21 (4.8%) 2 (3.2%) 23 (4.6%)
    Currently Married 287 (66%) 38 (61%) 325 (65%)
    Separated 34 (7.8%) 4 (6.5%) 38 (7.6%)
    Widow/Widower 71 (16%) 13 (21%) 84 (17%)
    Cohabitating 6 (1.4%) 2 (3.2%) 8 (1.6%)
    Divorced 19 (4.3%) 3 (4.8%) 22 (4.4%)
Domicile


0.13
    Rural 25 (5.7%) 8 (13%) 33 (6.6%)
    Semi-Urban 146 (33%) 20 (32%) 166 (33%)
    Urban 267 (61%) 34 (55%) 301 (60%)
Income Bracket


0.030
    0-100 156 (36%) 18 (30%) 174 (35%)
    101-250 131 (30%) 19 (31%) 150 (30%)
    251-500 92 (21%) 17 (28%) 109 (22%)
    501-1500 42 (9.6%) 1 (1.6%) 43 (8.7%)
    1501-3000 11 (2.5%) 4 (6.6%) 15 (3.0%)
    > 3000 4 (0.9%) 2 (3.3%) 6 (1.2%)
    Unknown 2 1 3
Religion


0.2
    Christianity 395 (90%) 53 (85%) 448 (90%)
    Islam 41 (9.4%) 8 (13%) 49 (9.8%)
    Other 2 (0.5%) 1 (1.6%) 3 (0.6%)
Type of Stroke


0.7
    Ischemic Stroke 290 (73%) 42 (76%) 332 (74%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (20%) 103 (23%)
    Ischemic With Hemorrhagic Transformation 8 (2.0%) 2 (3.6%) 10 (2.2%)
    Untyped Stroke (no CT scan available) 5 (1.3%) 0 (0%) 5 (1.1%)
    Unknown 43 7 50
Stroke Type


0.8
    Ischemic Stroke 298 (75%) 44 (80%) 342 (76%)
    Intracerebral Hemorrhagic Stroke 92 (23%) 11 (20%) 103 (23%)
    Untyped Stroke (no CT scan available) 5 (1.3%) 0 (0%) 5 (1.1%)
    Unknown 43 7 50
Stroke Severity (NIHSS) 3.0 (0.0, 7.0) 3.0 (0.0, 9.0) 3.0 (0.0, 8.0) 0.6
    Unknown 10 3 13
Modified Ranking Score


0.14
    0 34 (7.8%) 8 (13%) 42 (8.5%)
    1 103 (24%) 15 (25%) 118 (24%)
    2 124 (28%) 12 (20%) 136 (27%)
    3 89 (20%) 11 (18%) 100 (20%)
    4 84 (19%) 13 (21%) 97 (20%)
    5 2 (0.5%) 2 (3.3%) 4 (0.8%)
    Unknown 2 1 3
Hyperlipidemia 145 (33%) 15 (24%) 160 (32%) 0.2
Hypertesion 411 (94%) 58 (94%) 469 (94%) >0.9
Baseline SBP >= 160mmHg


0.8
    <160mmHg 282 (64%) 41 (66%) 323 (65%)
    >=160mmHg 156 (36%) 21 (34%) 177 (35%)
Diabetes Mellitus 142 (32%) 27 (44%) 169 (34%) 0.083
Cigarette smoking 35 (8.2%) 10 (16%) 45 (9.3%) 0.040
    Unknown 13 1 14
Overweight & obesity 227 (59%) 31 (63%) 258 (60%) 0.6
    Unknown 56 13 69
Categorised BMI


0.8
    Normal 155 (41%) 18 (37%) 173 (40%)
    Overweight 122 (32%) 18 (37%) 140 (32%)
    Obese 105 (27%) 13 (27%) 118 (27%)
    Unknown 56 13 69
HBA1C (Baseline) 5.80 (5.40, 6.60) 6.30 (5.70, 9.20) 5.80 (5.40, 6.70) 0.005
    Unknown 91 17 108
High HbA1C 97 (28%) 21 (47%) 118 (30%) 0.010
    Unknown 91 17 108
Systolic Blood Pressure 153 (146, 168) 154 (145, 165) 153 (145, 168) 0.9
Diastolic Blood Pressure 94 (87, 102) 96 (85, 102) 94 (87, 102) 0.9
BB 60 (14%) 10 (16%) 70 (14%) 0.6
CCB 358 (82%) 43 (69%) 401 (80%) 0.022
ARB 240 (55%) 23 (37%) 263 (53%) 0.009
DIURETIC 123 (28%) 16 (26%) 139 (28%) 0.7
METHYLDOPA 35 (8.0%) 3 (4.8%) 38 (7.6%) 0.6
ACEI 82 (19%) 12 (19%) 94 (19%) >0.9
VASODILATOR 32 (7.3%) 3 (4.8%) 35 (7.0%) 0.6
ALPHA BLOCKER 1 (0.2%) 0 (0%) 1 (0.2%) >0.9
Dose Index 1.33 (0.83, 1.83) 1.33 (0.83, 1.69) 1.33 (0.83, 1.83) 0.4
    Unknown 47 14 61
Antiplatelets 261 (64%) 38 (72%) 299 (64%) 0.2
    Unknown 27 9 36
Statins 318 (77%) 44 (85%) 362 (78%) 0.2
    Unknown 25 10 35
Total Hillbone Score 52.0 (50.0, 53.0) 52.0 (48.0, 53.0) 52.0 (50.0, 53.0) 0.055
    Unknown 7 2 9
Health Literacy in HPT/stroke 9 (6, 10) 8 (6, 10) 8 (6, 10) 0.6
    Unknown 28 2 30
Study Arm


0.6
    Intervention 212 (48%) 32 (52%) 244 (49%)
    Routine 226 (52%) 30 (48%) 256 (51%)
Healthcare Facility Type


0.2
    Primary 135 (31%) 13 (21%) 148 (30%)
    Secondary 100 (23%) 19 (31%) 119 (24%)
    Tertiary 203 (46%) 30 (48%) 233 (47%)
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_one_ALL.docx")
[1] TRUE
Show the code
table_one %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_one_ALL.docx") 

Table 2: ALL CAUSE - Combined univariate & multivariate cox regression

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  filter(include_exclude == "INCLUDE") %>% 
  filter(dura_all_cause != 0) %>% 
    select(
      -c(mace, mace_factor, dura_mace, 
         mace_all_cause_factor, 
         all_cause, all_cause_factor, dura_all_cause, 
         include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_mace_all_cause, 
        event = df_temp1$mace_all_cause)


tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(mace_all_cause, dura_mace_all_cause)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, nihss_scale, ranking, 
        tobacco_use, bmi_cat, ff_hba1c_0) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::add_global_p() %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()

 
table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: MACE and ALL CAUSE - Univartiate and multivariate cox regression") 

table_two 
Table 2: MACE and ALL CAUSE - Univartiate and multivariate cox regression
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 468 1.03 1.00, 1.06 0.061 315 1.03 1.00, 1.07 0.072
Gender 468


315

0.7
    Male



    Female
1.34 0.69, 2.59 0.4
0.86 0.34, 2.15
Level of Formal education 468






    None





    Primary
0.54 0.17, 1.76 0.3



    Secondary
1.08 0.36, 3.26 0.9



    Tertiary
1.02 0.30, 3.49 >0.9



Marital Status 468






    Never Married





    Currently Married
1.48 0.20, 11.0 0.7



    Separated
1.88 0.20, 18.1 0.6



    Widow/Widower
2.39 0.30, 19.1 0.4



    Cohabitating
3.02 0.19, 48.2 0.4



    Divorced
2.25 0.20, 24.9 0.5



Domicile 468






    Rural





    Semi-Urban
0.79 0.22, 2.77 0.7



    Urban
0.59 0.18, 2.01 0.4



Income Bracket 465






    0-100





    101-250
0.71 0.30, 1.70 0.4



    251-500
1.17 0.51, 2.71 0.7



    501-1500
0.00 0.00, Inf >0.9



    1501-3000
2.13 0.48, 9.39 0.3



    > 3000
2.28 0.30, 17.4 0.4



Religion 468






    Christianity





    Islam
1.53 0.59, 3.96 0.4



    Other
5.20 0.71, 38.2 0.11



Type of Stroke 421






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.39 0.12, 1.30 0.13



    Ischemic With Hemorrhagic Transformation
3.33 0.79, 14.0 0.10



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Type 421






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.37 0.11, 1.23 0.11



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 460 1.11 1.05, 1.16 <0.001 315 1.11 1.02, 1.19 0.011
Modified Ranking Score 467 1.33 1.01, 1.76 0.044 315 0.88 0.57, 1.35 0.6
Hyperlipidemia 468






    No





    Yes
0.52 0.23, 1.18 0.12



Hypertesion 468






    No





    Yes
2.15 0.29, 15.7 0.5



Baseline SBP >= 160mmHg 468






    <160mmHg





    >=160mmHg
1.22 0.62, 2.39 0.6



Diabetes Mellitus 468






    No





    Yes
1.68 0.86, 3.26 0.13



Cigarette smoking 456


315

0.052
    No



    Yes
2.55 1.11, 5.84 0.027
3.26 1.08, 9.84
Overweight & obesity 409






    No





    Yes
2.15 0.92, 5.02 0.078



Categorised BMI 409


315

0.071
    Normal



    Overweight
2.52 1.02, 6.25 0.046
3.09 1.13, 8.44
    Obese
1.70 0.62, 4.70 0.3
2.10 0.64, 6.85
HBA1C (Baseline) 372 1.15 1.01, 1.32 0.037 315 1.03 0.85, 1.24 0.8
High HbA1C 372






    No





    Yes
1.83 0.87, 3.87 0.11



Systolic Blood Pressure 468 1.01 0.99, 1.02 0.6



Diastolic Blood Pressure 468 0.99 0.97, 1.02 0.6



BB 468 1.98 0.90, 4.37 0.089



CCB 468 0.75 0.34, 1.65 0.5



ARB 468 0.53 0.26, 1.04 0.066



DIURETIC 468 1.28 0.62, 2.61 0.5



METHYLDOPA 468 0.75 0.18, 3.14 0.7



ACEI 468 1.26 0.57, 2.78 0.6



VASODILATOR 468 0.82 0.20, 3.44 0.8



ALPHA BLOCKER 468 0.00 0.00, Inf >0.9



Dose Index 417 0.96 0.60, 1.56 0.9



Antiplatelets 436






    FALSE





    TRUE
1.86 0.80, 4.33 0.2



Statins 437






    FALSE





    TRUE
1.14 0.46, 2.80 0.8



Total Hillbone Score 461 0.94 0.88, 1.01 0.10



Health Literacy in HPT/stroke 440 0.92 0.83, 1.02 0.11



Study Arm 468






    Intervention





    Routine
0.92 0.47, 1.78 0.8



Healthcare Facility Type 468






    Primary





    Secondary
2.23 0.91, 5.46 0.079



    Tertiary
1.34 0.56, 3.16 0.5



Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_two.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_two.docx") 

Table 2: ALL CAUSE - Combined univariate & multivariate cox regression (ALL)

Show the code
df_temp1 <- 
  df_for_mace_paper %>%
  mutate(
    mace_all_cause = case_when(
      include_exclude == "EXCLUDE" ~ 1, TRUE ~ mace_all_cause), 
    mace_all_cause_factor = factor(
      mace_all_cause, levels = 0:1, labels = c("No", "Yes"))) %>%  
  filter(dura_mace_all_cause != 0) %>% 
    select(
      -c(mace, mace_factor, dura_mace,
         all_cause, all_cause_factor, dura_all_cause,
         mace_all_cause_factor, 
         include_exclude))
  
surv_obj <- 
    survival::Surv(
        time = df_temp1$dura_mace_all_cause, 
        event = df_temp1$mace_all_cause)

tbl_cox_uv <- 
    df_temp1 %>% 
    select(-c(mace_all_cause, dura_mace_all_cause)) %>% 
    gtsummary::tbl_uvregression(
        y = surv_obj,
        method = survival::coxph,
        exponentiate = TRUE) %>%
    gtsummary::bold_labels() %>%
    gtsummary::bold_p() 

tbl_cox_mv <- 
    df_temp1 %>% 
    select(
        a_agebase, a_gender, a_income, tobacco_use, 
        ff_hba1c_0, ARB, hosp_cat) %>% 
    survival::coxph(
        surv_obj ~ ., data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


table_two <- 
  tbl_merge(
    list(tbl_cox_uv, tbl_cox_mv),
    tab_spanner = c("**Univariate**", "**Multivariate**")) %>%    
    modify_caption(
        caption = "**Table 2**: MACE and ALL CAUSE - Univartiate and multivariate cox regression (ALL)") 

table_two 
Table 2: MACE and ALL CAUSE - Univartiate and multivariate cox regression (ALL)
Characteristic
Univariate
Multivariate
N HR 95% CI p-value N HR 95% CI p-value
Age in years 490 1.02 0.99, 1.04 0.2 377 1.02 0.99, 1.05 0.3
Gender 490


377


    Male



    Female
0.88 0.52, 1.50 0.6
0.78 0.39, 1.58 0.5
Level of Formal education 490






    None





    Primary
0.82 0.30, 2.21 0.7



    Secondary
1.36 0.52, 3.56 0.5



    Tertiary
1.25 0.43, 3.59 0.7



Marital Status 490






    Never Married





    Currently Married
1.33 0.32, 5.54 0.7



    Separated
1.30 0.24, 7.09 0.8



    Widow/Widower
1.53 0.34, 7.00 0.6



    Cohabitating
2.98 0.42, 21.2 0.3



    Divorced
1.72 0.29, 10.3 0.6



Domicile 490






    Rural





    Semi-Urban
0.64 0.26, 1.61 0.3



    Urban
0.50 0.21, 1.21 0.13



Income Bracket 487


377


    0-100



    101-250
1.27 0.65, 2.49 0.5
0.87 0.37, 2.04 0.8
    251-500
1.76 0.89, 3.49 0.11
1.01 0.43, 2.41 >0.9
    501-1500
0.00 0.00, Inf >0.9
0.00 0.00, Inf >0.9
    1501-3000
3.12 1.05, 9.29 0.040
0.53 0.06, 4.35 0.6
    > 3000
3.67 0.85, 15.9 0.082
4.18 0.83, 21.1 0.084
Religion 490






    Christianity





    Islam
1.41 0.67, 2.99 0.4



    Other
3.65 0.50, 26.5 0.2



Type of Stroke 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.87 0.43, 1.75 0.7



    Ischemic With Hemorrhagic Transformation
2.28 0.55, 9.45 0.3



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Type 440






    Ischemic Stroke





    Intracerebral Hemorrhagic Stroke
0.85 0.42, 1.69 0.6



    Untyped Stroke (no CT scan available)
0.00 0.00, Inf >0.9



Stroke Severity (NIHSS) 481 1.04 0.99, 1.09 0.10



Modified Ranking Score 489 1.06 0.86, 1.31 0.6



Hyperlipidemia 490






    No





    Yes
0.60 0.32, 1.12 0.11



Hypertesion 490






    No





    Yes
1.71 0.42, 6.99 0.5



Baseline SBP >= 160mmHg 490






    <160mmHg





    >=160mmHg
1.08 0.63, 1.85 0.8



Diabetes Mellitus 490






    No





    Yes
1.56 0.93, 2.63 0.10



Cigarette smoking 477


377


    No



    Yes
2.24 1.13, 4.43 0.021
1.44 0.55, 3.76 0.5
Overweight & obesity 425






    No





    Yes
1.07 0.59, 1.94 0.8



Categorised BMI 425






    Normal





    Overweight
1.18 0.60, 2.31 0.6



    Obese
0.94 0.45, 2.00 0.9



HBA1C (Baseline) 386 1.16 1.04, 1.29 0.007 377 1.18 1.06, 1.32 0.003
High HbA1C 386






    No





    Yes
2.00 1.09, 3.68 0.025



Systolic Blood Pressure 490 1.00 0.99, 1.02 0.6



Diastolic Blood Pressure 490 1.00 0.98, 1.02 0.8



BB 490 1.51 0.76, 2.99 0.2



CCB 490 0.60 0.34, 1.07 0.085



ARB 490 0.55 0.32, 0.94 0.028 377 0.35 0.18, 0.70 0.003
DIURETIC 490 1.15 0.65, 2.06 0.6



METHYLDOPA 490 0.72 0.23, 2.31 0.6



ACEI 490 1.13 0.60, 2.14 0.7



VASODILATOR 490 0.81 0.25, 2.61 0.7



ALPHA BLOCKER 490 0.00 0.00, Inf >0.9



Dose Index 432 0.96 0.64, 1.44 0.9



Antiplatelets 455






    FALSE





    TRUE
1.30 0.71, 2.39 0.4



Statins 456






    FALSE





    TRUE
1.35 0.63, 2.88 0.4



Total Hillbone Score 482 0.96 0.91, 1.02 0.2



Health Literacy in HPT/stroke 462 0.96 0.89, 1.05 0.4



Study Arm 490






    Intervention





    Routine
0.94 0.56, 1.57 0.8



Healthcare Facility Type 490


377


    Primary



    Secondary
2.23 1.03, 4.80 0.041
2.66 1.04, 6.80 0.041
    Tertiary
2.02 1.01, 4.03 0.048
1.68 0.69, 4.07 0.3
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_two_ALL.docx")
[1] TRUE
Show the code
table_two %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_two_ALL.docx") 

Table 3: MACE and ALL CAUSE - Selected multivarite cox regression

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, 
        nihss_scale) 


tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(
      c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, 
    nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: MACE and ALL CAUSE - Selected multivariate cox regression") 

table_three 
Table 3: MACE and ALL CAUSE - Selected multivariate cox regression
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 321 1.37 0.99, 1.92 0.060 490 1.12 0.87, 1.43 0.4
Cigarette smoking 321


490


    No



    Yes
2.29 0.92, 5.70 0.076
2.00 0.97, 4.09 0.059
HBA1C (Baseline) 321 1.08 0.94, 1.24 0.3 490 1.15 1.03, 1.28 0.015
SBP < 160mmHg 321


490


    No



    Yes
1.41 0.68, 2.89 0.4
1.05 0.60, 1.85 0.9
Total Hillbone Score 321 0.97 0.89, 1.06 0.5 490 0.96 0.90, 1.03 0.2
Overweight & Obesity 321


490


    No



    Yes
1.47 0.69, 3.12 0.3
1.13 0.60, 2.14 0.7
Stroke Severity (NIHSS) 321 1.04 0.99, 1.10 0.14 490 1.03 0.99, 1.08 0.15
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three.docx")
[1] TRUE
Show the code
table_three %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three.docx") 

Table 3: ALL CAUSE - Males

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_males <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (MALES)")

table_three_males 
Table 3: Selected multivariate cox regression (MALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 176 1.41 0.85, 2.33 0.2 277 1.04 0.74, 1.46 0.8
Cigarette smoking 176


277


    No



    Yes
2.48 0.88, 6.98 0.085
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 176 1.11 0.93, 1.34 0.3 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 176


277


    No



    Yes
1.16 0.43, 3.14 0.8
0.97 0.46, 2.07 >0.9
Total Hillbone Score 176 0.94 0.84, 1.06 0.3 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 176


277


    No



    Yes
1.00 0.38, 2.63 >0.9
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 176 1.08 1.00, 1.16 0.056 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_males.docx")
[1] TRUE
Show the code
table_three_males %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_males.docx") 

Table 3: Females

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(a_gender == "Female") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_females <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Selected multivariate cox regression (FEMALES)")

table_three_females 
Table 3: Selected multivariate cox regression (FEMALES)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 145 1.47 0.88, 2.45 0.14 277 1.04 0.74, 1.46 0.8
Cigarette smoking 145


277


    No



    Yes
0.00 0.00, Inf >0.9
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 145 1.07 0.85, 1.35 0.6 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 145


277


    No



    Yes
2.03 0.67, 6.12 0.2
0.97 0.46, 2.07 >0.9
Total Hillbone Score 145 1.03 0.89, 1.19 0.7 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 145


277


    No



    Yes
2.42 0.48, 12.1 0.3
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 145 1.01 0.92, 1.11 0.8 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_females.docx")
[1] TRUE
Show the code
table_three_females %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_females.docx") 

Table 3: ALL CAUSE: PINGS = Intervention

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Intervention") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_intervention <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: Allcaise Selected multivariate cox regression (Intervention)")

table_three_intervention 
Table 3: Allcaise Selected multivariate cox regression (Intervention)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 157 1.87 1.11, 3.13 0.019 277 1.04 0.74, 1.46 0.8
Cigarette smoking 157


277


    No



    Yes
1.28 0.34, 4.88 0.7
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 157 1.19 1.01, 1.39 0.033 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 157


277


    No



    Yes
2.17 0.81, 5.84 0.13
0.97 0.46, 2.07 >0.9
Total Hillbone Score 157 1.00 0.87, 1.14 >0.9 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 157


277


    No



    Yes
1.37 0.48, 3.87 0.6
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 157 1.07 0.98, 1.16 0.15 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_intervention.docx")
[1] TRUE
Show the code
table_three_intervention %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_intervention.docx") 

Table 3: ALL CAUSE - PINGS = Routine

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(arm == "Routine") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: MACE and ALL ACUSE Selected multivariate cox regression (Routine)")

table_three_routine 
Table 3: MACE and ALL ACUSE Selected multivariate cox regression (Routine)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 164 1.15 0.74, 1.80 0.5 277 1.04 0.74, 1.46 0.8
Cigarette smoking 164


277


    No



    Yes
2.69 0.71, 10.2 0.15
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 164 0.83 0.54, 1.27 0.4 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 164


277


    No



    Yes
0.79 0.26, 2.39 0.7
0.97 0.46, 2.07 >0.9
Total Hillbone Score 164 0.92 0.81, 1.05 0.2 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 164


277


    No



    Yes
1.86 0.59, 5.91 0.3
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 164 1.03 0.96, 1.12 0.4 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_Routine.docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_routine.docx") 

Table 3: Stroke Type = Ischemic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Ischemic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: MACE and ALL_Cause Selected multivariate cox regression (Ischemic Stroke)")

table_three_routine 
Table 3: MACE and ALL_Cause Selected multivariate cox regression (Ischemic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 230 1.32 0.90, 1.95 0.2 277 1.04 0.74, 1.46 0.8
Cigarette smoking 230


277


    No



    Yes
2.13 0.68, 6.68 0.2
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 230 1.11 0.96, 1.29 0.2 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 230


277


    No



    Yes
1.29 0.55, 3.04 0.6
0.97 0.46, 2.07 >0.9
Total Hillbone Score 230 0.97 0.86, 1.09 0.6 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 230


277


    No



    Yes
1.56 0.63, 3.86 0.3
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 230 1.04 0.97, 1.11 0.3 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_Routine (Ischemic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_routine (Ischemic Stroke).docx") 

Table 3: Stroke Type = Intracerebral Hemorrhagic Stroke

Show the code
df_for_tbl_three <- 
  df_temp1 %>% 
  filter(d_st_type_2 == "Intracerebral Hemorrhagic Stroke") %>%
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No")) %>% 
    select(
        a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
        obese_overwgt, mace_all_cause, dura_mace_all_cause, nihss_scale) 

surv_obj <- 
    survival::Surv(
        time = df_for_tbl_three$dura_mace_all_cause, 
        event = df_for_tbl_three$mace_all_cause)

tbl_cox_mv_2 <- 
    df_for_tbl_three %>% 
    survival::coxph(
        surv_obj ~ a_agebase10 + tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + 
        obese_overwgt + nihss_scale, data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p() %>% 
    gtsummary::add_n()


imputed_data <- 
  df_temp1 %>%
  filter(a_gender == "Male") %>% 
  mutate(
    a_agebase10 = a_agebase/10, 
    sbp_160 = case_when(sbp >= 160 ~ "Yes", sbp < 160 ~ "No"), 
    across(c(tobacco_use, sbp_160, obese_overwgt, hosp_cat), ~factor(.x))) %>%
  select(
    a_agebase10, tobacco_use, ff_hba1c_0, sbp_160, hillbone, 
    obese_overwgt, hosp_cat, mace_all_cause, dura_mace_all_cause, nihss_scale) %>% 
#  drop_na(mace, dura_mace) %>% 
  mice::mice(m = 20, method = 'pmm', seed = 123, printFlag = FALSE) 

cox_models <- with(
  imputed_data,
  survival::coxph(
    survival::Surv(event = mace_all_cause, time = dura_mace_all_cause) ~ a_agebase10 + 
      tobacco_use + ff_hba1c_0 + sbp_160 + hillbone + obese_overwgt + 
      nihss_scale))

tbl_cox_mv_3 <- 
    cox_models %>% 
    gtsummary::tbl_regression(
        exponentiate = TRUE, 
        label = list(
          sbp_160 ~ "SBP < 160mmHg", 
          a_agebase10 ~ "Baseline age per10 years", 
          tobacco_use ~ "Cigarette smoking", 
          obese_overwgt = "Overweight & Obesity")) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()%>% 
    gtsummary::add_n()

table_three_routine <- 
  tbl_merge(
    list(tbl_cox_mv_2, tbl_cox_mv_3),
    tab_spanner = c("**Complete Cases**", "**MICE Imputed**")) %>%    
    modify_caption(
        caption = "**Table 3**: All Cause Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)")

table_three_routine 
Table 3: All Cause Selected multivariate cox regression (Intracerebral Hemorrhagic Stroke)
Characteristic
Complete Cases
MICE Imputed
N HR 95% CI p-value N HR 95% CI p-value
Baseline age per10 years 53 1.19 0.33, 4.24 0.8 277 1.04 0.74, 1.46 0.8
Cigarette smoking 53


277


    No



    Yes
3.45 0.19, 63.7 0.4
1.99 0.86, 4.61 0.10
HBA1C (Baseline) 53 1.10 0.65, 1.83 0.7 277 1.16 1.00, 1.36 0.053
SBP < 160mmHg 53


277


    No



    Yes
0.80 0.10, 6.44 0.8
0.97 0.46, 2.07 >0.9
Total Hillbone Score 53 0.89 0.74, 1.06 0.2 277 0.97 0.88, 1.06 0.5
Overweight & Obesity 53


277


    No



    Yes
3.29 0.19, 57.6 0.4
0.82 0.34, 1.94 0.6
Stroke Severity (NIHSS) 53 1.09 0.90, 1.31 0.4 277 1.05 0.99, 1.12 0.10
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
Show the code
file.remove("Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_Routine (Intracerebral Hemorrhagic Stroke).docx")
[1] TRUE
Show the code
table_three_routine %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "Tables/MACE and All Cause/MACE and ALL_CAUSE_table_three_routine (Intracerebral Hemorrhagic Stroke).docx")