SPARCo 2 Analysis: MOCA

Importing data

Data Preparation

Code
df_sparco_2_clean <-  
    df_sparco_2 %>% 
    select(
        -c(telephone2, consent_sign, participant_name, consent_person, 
          first_name, middle_name, last_name, residential, digital_address,
          social_family_relations, lhimsno, sparco_i_id, telephone1,
          attend_doc)) %>% 
    janitor::remove_empty(which = c("rows", "cols")) %>% 
    rename(
        minimental_state_comp = minimental_state_examination_adolescents_adults_complete,
        demo_comp = demographic_characteristics_complete,
        past_int_hx_comp = past_interim_history_complete,
        opd_visit_outc_comp = outpatient_visit_outcomes_complete,
        goofd_draw_test_comp = goodenough_drawaperson_test_complete,
        stroke_risk_comp = stroke_risk_assessment_adolescents_adults_complete,
        vascular_risk_comp = vascular_risk_factors_assessment_adolescents_adult_complete,
        hamd_comp = hamilton_depression_rating_scale_hamd_adolescents_complete,
        qol_eq5d_comp = quality_of_life_eq5d_adolescents_adults_complete,
        moca_comp = montreal_cognitive_assessment_moca_adolescents_adu_complete,
        ipd_outc_comp = inpatient_visit_outcomes_complete) %>% 
    mutate(
        across(
            c(temp:head_circ, mcv_fl, mch_pg, mchc, neut, 
              plt_103ul, moca_tot_score), 
            ~ifelse(.x < 0, NA, .x)),
        across(c(weight, height), ~as.numeric(.x)),
        across(sex, ~labelled::to_factor(.x)), 
        across(c(weight, height), ~ifelse(.x < 0, NA, .x)), 
        hamd_greater_than_7 = case_when(
            hamd_total >= 8 ~ "Yes", hamd_total < 8 ~ "No") %>% 
            factor(),
        hamd_cat = case_when(
            hamd_total <= 7 ~ "Normal",
            hamd_total <= 17 ~ "Mild",
            hamd_total <= 24 ~ "Moderate",
            hamd_total >= 25 ~ "Severe") %>% 
            factor(levels = c("Normal", "Mild", "Moderate", "Severe")),
        pulse = ifelse(pulse == 878, 87, pulse),
        sat = ifelse(sat >100, 100, sat),
        religion = fct_relevel(religion, "Christian", "Muslim"),
        scd_test_result_ss_sbthal = fct_recode(
            scd_test_result_ss_sbthal, 
            "S-beta thal" = "S-beta thal zero (nought)",
            "S-beta thal" = "S-beta thal plus/minus"),
        scd_test_result_ss_sbthal = fct_na_level_to_value(
            scd_test_result_ss_sbthal,
            extra_levels = "Pending confirmation"),
        res_status = fct_relevel(res_status, "Urban", "Semi-urban"),
        edu_status = fct_relevel(
            edu_status, 
            "Tertiary", "SHS/Vocational", "JHS", "Basic"),
        category_of_patient = fct_relevel(
            category_of_patient,
            "Adult (18+ years)", "Adolescent (10-17 years)", 
            "Child (< 10 years)"),
        cal_age_recruit_yrs_2 = cal_age_recruit_yrs/10)

df_for_moca <- 
    df_sparco_2_clean %>% 
    filter(redcap_event_name == "Enrolment") %>% 
    select(
        moca_tot_score, hamd_greater_than_7, hamd_cat,
        category_of_patient, cal_age_recruit_yrs,
        cal_age_recruit_mths,cal_age_recruit_yrs_2, sex,
        scd_test_result_ss_sbthal, edu_status, religion, 
        res_status, diag_pathway, using_hydroxyurea, 
        penicillin_v_prophylaxis, folic_acid, 
        temp, pulse, resp_rate, sat, sbp, dbp, wbc_103ul, hb_g_dl,
        rbc_106ul, mcv_fl, mch_pg, mchc, neut, plt_103ul, hamd_total,
        moca_tot_score, eq_5d_health_status) %>% 
    drop_na(moca_tot_score) %>% 
    mutate(
        moca_less_than_median = case_when(
            moca_tot_score < median(moca_tot_score) ~ "Yes",
            TRUE ~ "No") %>% 
            factor()) %>% 
    droplevels()

labelled::var_label(df_for_moca) <- 
    list(
        eq_5d_health_status = "EQ-5D Health Status",
        hamd_cat = "Categorised HAMD",
        hamd_total = "Total HAMD",
        cal_age_recruit_yrs = "Age (years)",
        cal_age_recruit_yrs_2 = "Age(per 10 years)",
        cal_age_recruit_mths = "Age (months)",
        category_of_patient = "Age category",
        sex = "Sex",
        scd_test_result_ss_sbthal = "Genotype", 
        hamd_greater_than_7 = "Depression Status",
        edu_status = "Educational status", 
        religion = "Religion", 
        res_status = "Residential Status", 
        diag_pathway = "Diagnosis Pathway", 
        using_hydroxyurea = "HU Usage", 
        penicillin_v_prophylaxis = "Penicillin Use", 
        folic_acid = "Folic Acid Usage",
        temp = "Temperature", 
        pulse = "Pulse", 
        resp_rate = "Respiratory Rate", 
        sat = "Oxygen Saturation", 
        sbp = "Systolic Blood Pressure (mmHg)", 
        dbp = "Diastolic Blood Pressure (mmHg)", 
        wbc_103ul = "White Bolld Cell Count (10^-3ul)", 
        hb_g_dl = "Hemoglobin (g/dl)" , 
        rbc_106ul = "Red Blood Cells Count (10^-6ul)", 
        mcv_fl = "MCV (fl)", 
        mch_pg = "MCH (pg)", 
        mchc = "MCHC", 
        neut = "Neutrophil count", 
        plt_103ul = "Platelet Count (10^-3ul)",
        moca_tot_score = "Total MOCA Score")

Data Summary

Code
gtsummary::theme_gtsummary_eda()
Setting theme "Exploratory Data Analysis"
Code
gtsummary::theme_gtsummary_compact()
Setting theme "Compact"
Code
df_for_moca %>% 
    gtsummary::tbl_summary(
        digits = gtsummary::all_categorical()~ c(0,1),
        statistic = gtsummary::all_categorical() ~ "{n} ({p})",
        missing_text = "Missing"
        ) %>% 
    gtsummary::bold_labels()  
Characteristic N = 6281
Total MOCA Score
    Median (Q1, Q3) 27 (24, 29)
    Mean (SD) 26 (5)
    Min, Max 0, 30
Depression Status 158 (25.9)
    Missing 18
Categorised HAMD
    Normal 452 (74.1)
    Mild 130 (21.3)
    Moderate 24 (3.9)
    Severe 4 (0.7)
    Missing 18
Age category
    Adult (18+ years) 441 (70.2)
    Adolescent (10-17 years) 176 (28.0)
    Child (< 10 years) 11 (1.8)
Age (years)
    Median (Q1, Q3) 19 (17, 24)
    Mean (SD) 22 (9)
    Min, Max 7, 69
Age (months)
    Median (Q1, Q3) 236 (204, 293)
    Mean (SD) 266 (108)
    Min, Max 94, 834
Age(per 10 years)
    Median (Q1, Q3) 1.90 (1.70, 2.40)
    Mean (SD) 2.17 (0.90)
    Min, Max 0.70, 6.90
Sex
    Male 248 (39.5)
    Female 380 (60.5)
Genotype
    SCD-SS 430 (68.9)
    SCD-SC 189 (30.3)
    S-beta thal 5 (0.8)
    Missing 4
Educational status
    Tertiary 157 (25.0)
    SHS/Vocational 296 (47.1)
    JHS 132 (21.0)
    Basic 38 (6.1)
    None 5 (0.8)
Religion
    Christian 563 (89.6)
    Muslim 64 (10.2)
    None 1 (0.2)
Residential Status
    Urban 432 (69.5)
    Semi-urban 182 (29.3)
    Rural 8 (1.3)
    Missing 6
Diagnosis Pathway
    Non-NSP 346 (55.4)
    NSP 278 (44.6)
    Missing 4
HU Usage 222 (35.7)
    Missing 6
Penicillin Use 428 (68.2)
Folic Acid Usage 609 (97.1)
    Missing 1
Temperature
    Median (Q1, Q3) 36.70 (36.50, 37.00)
    Mean (SD) 36.69 (0.38)
    Min, Max 35.00, 38.00
    Missing 31
Pulse
    Median (Q1, Q3) 82 (74, 92)
    Mean (SD) 84 (14)
    Min, Max 36, 149
    Missing 46
Respiratory Rate
    Median (Q1, Q3) 69 (24, 79)
    Mean (SD) 56 (29)
    Min, Max 15, 134
    Missing 91
Oxygen Saturation
    Median (Q1, Q3) 97.00 (94.00, 98.00)
    Mean (SD) 95.69 (4.31)
    Min, Max 50.00, 100.00
    Missing 80
Systolic Blood Pressure (mmHg)
    Median (Q1, Q3) 111 (103, 119)
    Mean (SD) 112 (13)
    Min, Max 80, 184
    Missing 78
Diastolic Blood Pressure (mmHg)
    Median (Q1, Q3) 65 (60, 72)
    Mean (SD) 66 (11)
    Min, Max 19, 118
    Missing 78
White Bolld Cell Count (10^-3ul)
    Median (Q1, Q3) 9.0 (7.0, 11.8)
    Mean (SD) 9.3 (3.4)
    Min, Max 3.0, 19.8
    Missing 469
Hemoglobin (g/dl)
    Median (Q1, Q3) 8.50 (7.40, 10.00)
    Mean (SD) 8.90 (2.29)
    Min, Max 5.00, 26.00
    Missing 469
Red Blood Cells Count (10^-6ul)
    Median (Q1, Q3) 2.99 (2.41, 3.34)
    Mean (SD) 3.05 (0.97)
    Min, Max 1.91, 9.00
    Missing 469
MCV (fl)
    Median (Q1, Q3) 83 (75, 93)
    Mean (SD) 84 (13)
    Min, Max 28, 115
    Missing 470
MCH (pg)
    Median (Q1, Q3) 29.8 (27.0, 33.4)
    Mean (SD) 30.0 (4.8)
    Min, Max 17.0, 43.4
    Missing 470
MCHC
    Median (Q1, Q3) 36.00 (35.00, 37.00)
    Mean (SD) 35.43 (2.68)
    Min, Max 20.00, 40.00
    Missing 470
Neutrophil count
    Median (Q1, Q3) 4.17 (3.00, 6.00)
    Mean (SD) 5.21 (4.62)
    Min, Max 1.00, 42.00
    Missing 476
Platelet Count (10^-3ul)
    Median (Q1, Q3) 320 (214, 419)
    Mean (SD) 335 (152)
    Min, Max 89, 952
    Missing 470
Total HAMD
    Median (Q1, Q3) 4 (1, 8)
    Mean (SD) 5 (6)
    Min, Max 0, 30
    Missing 18
EQ-5D Health Status
    Median (Q1, Q3) 80 (70, 95)
    Mean (SD) 81 (17)
    Min, Max 25, 100
moca_less_than_median 278 (44.3)
1 n (%)

Table 1

Code
gtsummary::reset_gtsummary_theme()
gtsummary::theme_gtsummary_compact()
Setting theme "Compact"
Code
table_1 <- 
    df_for_moca %>% 
    select(cal_age_recruit_yrs, category_of_patient, sex, 
           scd_test_result_ss_sbthal, hamd_cat, moca_less_than_median,
           edu_status, religion, res_status, diag_pathway, 
           using_hydroxyurea, penicillin_v_prophylaxis, 
           folic_acid,  eq_5d_health_status) %>% 
    gtsummary::tbl_summary(
        by = moca_less_than_median,
        digits = list(
            gtsummary::all_categorical() ~ c(0,1),
            gtsummary::all_continuous() ~ 1),
        statistic = list(
        gtsummary::all_categorical() ~ "{n} ({p})")) %>% 
    gtsummary::bold_labels() %>%
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MoCA Less Than Median**") %>% 
    gtsummary::add_overall(last = T) %>%
    gtsummary::add_p(
        pvalue_fun = gtsummary::label_style_pvalue(digits = 3),
        test.args = gtsummary::all_tests("fisher.test") ~ list(simulate.p.value = TRUE)) %>% 
    gtsummary::bold_p()

table_1
Characteristic
MoCA Less Than Median
Overall
N = 6281
p-value2
No
N = 3501
Yes
N = 2781
Age (years) 19.0 (17.0, 23.0) 19.0 (16.0, 24.0) 19.0 (17.0, 24.0) 0.615
Age category


0.004
    Adult (18+ years) 248 (70.9) 193 (69.4) 441 (70.2)
    Adolescent (10-17 years) 101 (28.9) 75 (27.0) 176 (28.0)
    Child (< 10 years) 1 (0.3) 10 (3.6) 11 (1.8)
Sex


0.036
    Male 151 (43.1) 97 (34.9) 248 (39.5)
    Female 199 (56.9) 181 (65.1) 380 (60.5)
Genotype


0.152
    SCD-SS 231 (66.2) 199 (72.4) 430 (68.9)
    SCD-SC 116 (33.2) 73 (26.5) 189 (30.3)
    S-beta thal 2 (0.6) 3 (1.1) 5 (0.8)
    Unknown 1 3 4
Categorised HAMD


0.004
    Normal 271 (79.2) 181 (67.5) 452 (74.1)
    Mild 58 (17.0) 72 (26.9) 130 (21.3)
    Moderate 12 (3.5) 12 (4.5) 24 (3.9)
    Severe 1 (0.3) 3 (1.1) 4 (0.7)
    Unknown 8 10 18
Educational status


<0.001
    Tertiary 115 (32.9) 42 (15.1) 157 (25.0)
    SHS/Vocational 185 (52.9) 111 (39.9) 296 (47.1)
    JHS 46 (13.1) 86 (30.9) 132 (21.0)
    Basic 4 (1.1) 34 (12.2) 38 (6.1)
    None 0 (0.0) 5 (1.8) 5 (0.8)
Religion


0.011
    Christian 323 (92.3) 240 (86.3) 563 (89.6)
    Muslim 26 (7.4) 38 (13.7) 64 (10.2)
    None 1 (0.3) 0 (0.0) 1 (0.2)
Residential Status


0.001
    Urban 261 (75.4) 171 (62.0) 432 (69.5)
    Semi-urban 83 (24.0) 99 (35.9) 182 (29.3)
    Rural 2 (0.6) 6 (2.2) 8 (1.3)
    Unknown 4 2 6
Diagnosis Pathway


0.004
    Non-NSP 175 (50.3) 171 (62.0) 346 (55.4)
    NSP 173 (49.7) 105 (38.0) 278 (44.6)
    Unknown 2 2 4
HU Usage 141 (40.5) 81 (29.6) 222 (35.7) 0.005
    Unknown 2 4 6
Penicillin Use 243 (69.4) 185 (66.5) 428 (68.2) 0.441
Folic Acid Usage 341 (97.7) 268 (96.4) 609 (97.1) 0.331
    Unknown 1 0 1
EQ-5D Health Status 85.0 (75.0, 95.0) 80.0 (70.0, 90.0) 80.0 (70.0, 95.0) 0.049
1 Median (Q1, Q3); n (%)
2 Wilcoxon rank sum test; Fisher’s Exact Test for Count Data with simulated p-value (based on 2000 replicates); Pearson’s Chi-squared test
Code
file.remove("sparco_moca_paper_table_1.docx")
Warning in file.remove("sparco_moca_paper_table_1.docx"): cannot remove file
'sparco_moca_paper_table_1.docx', reason 'No such file or directory'
[1] FALSE
Code
table_1 %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "sparco_moca_paper_table_1.docx")

Table 2

Code
table_2 <- 
    df_for_moca %>% 
    select(
        moca_less_than_median, temp, pulse, resp_rate, sat, sbp, 
        dbp, wbc_103ul, hb_g_dl, rbc_106ul, mcv_fl, mch_pg, 
        mchc, neut, plt_103ul) %>% 
    gtsummary::tbl_summary(
        by = moca_less_than_median,
        digits = list(
            gtsummary::all_categorical() ~ c(0,1),
            gtsummary::all_continuous() ~ 1),
        statistic = list(
        gtsummary::all_continuous() ~ "{mean} ({sd})"),
        missing_text = "Missing") %>% 
    gtsummary::bold_labels() %>% 
    gtsummary::modify_spanning_header(
        gtsummary::all_stat_cols() ~ "**MoCA Less Than Median**") %>% 
    gtsummary::add_overall(last = T) %>%
    gtsummary::add_p(
        pvalue_fun = gtsummary::label_style_pvalue(digits = 3)) %>% 
    gtsummary::bold_p()

table_2
Characteristic
MoCA Less Than Median
Overall
N = 6281
p-value2
No
N = 3501
Yes
N = 2781
Temperature 36.7 (0.4) 36.7 (0.4) 36.7 (0.4) 0.554
    Missing 12 19 31
Pulse 83.2 (13.5) 84.3 (15.6) 83.6 (14.5) 0.715
    Missing 24 22 46
Respiratory Rate 58.0 (28.1) 52.6 (30.2) 55.6 (29.1) 0.114
    Missing 52 39 91
Oxygen Saturation 95.5 (4.7) 95.9 (3.8) 95.7 (4.3) 0.355
    Missing 40 40 80
Systolic Blood Pressure (mmHg) 112.7 (11.4) 110.8 (13.8) 111.8 (12.5) 0.018
    Missing 49 29 78
Diastolic Blood Pressure (mmHg) 66.6 (10.0) 65.7 (11.5) 66.2 (10.7) 0.368
    Missing 49 29 78
White Bolld Cell Count (10^-3ul) 9.4 (3.0) 9.1 (3.8) 9.3 (3.4) 0.386
    Missing 254 215 469
Hemoglobin (g/dl) 8.9 (1.9) 8.9 (2.8) 8.9 (2.3) 0.341
    Missing 254 215 469
Red Blood Cells Count (10^-6ul) 3.0 (0.9) 3.1 (1.1) 3.0 (1.0) 0.431
    Missing 254 215 469
MCV (fl) 85.8 (12.5) 80.1 (12.2) 83.6 (12.7) 0.010
    Missing 254 216 470
MCH (pg) 30.6 (4.9) 28.9 (4.6) 30.0 (4.8) 0.033
    Missing 254 216 470
MCHC 35.6 (2.2) 35.1 (3.3) 35.4 (2.7) 0.306
    Missing 254 216 470
Neutrophil count 5.1 (4.6) 5.3 (4.8) 5.2 (4.6) 0.985
    Missing 258 218 476
Platelet Count (10^-3ul) 348.9 (149.8) 314.1 (153.1) 335.0 (151.6) 0.118
    Missing 255 215 470
1 Mean (SD)
2 Wilcoxon rank sum test
Code
file.remove("sparco_moca_paper_table_2.docx")
Warning in file.remove("sparco_moca_paper_table_2.docx"): cannot remove file
'sparco_moca_paper_table_2.docx', reason 'No such file or directory'
[1] FALSE
Code
table_2 %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "sparco_moca_paper_table_2.docx")

Table 3 - Logistic Regression

Code
tbl_one <- 
    df_for_moca %>% 
    select(
        cal_age_recruit_yrs_2, sex, 
        scd_test_result_ss_sbthal, moca_less_than_median,
        edu_status, religion, res_status, diag_pathway, 
        using_hydroxyurea, penicillin_v_prophylaxis, 
        folic_acid, temp, pulse, resp_rate, sat, sbp, 
        dbp, wbc_103ul, hb_g_dl, rbc_106ul, mcv_fl, mch_pg, 
        mchc, neut, plt_103ul, moca_tot_score, eq_5d_health_status) %>% 
gtsummary::tbl_uvregression(
    method = glm,
    y = moca_less_than_median,
    method.args = list(family = binomial),
    exponentiate = TRUE,
    pvalue_fun = gtsummary::label_style_pvalue(digits = 3),
    show_single_row = c(using_hydroxyurea, penicillin_v_prophylaxis, 
        folic_acid)) %>% 
    gtsummary::bold_p() %>%
    gtsummary::bold_labels()


tbl_two <- 
    df_for_moca %>% 
    select(
        moca_less_than_median, sex, edu_status, eq_5d_health_status, 
        cal_age_recruit_yrs_2, religion, res_status, diag_pathway,
        using_hydroxyurea) %>% 
    glm(moca_less_than_median ~ ., data = ., family = binomial) %>% 
    gtsummary::tbl_regression(
        exponentiate = T, 
        pvalue_fun = gtsummary::label_style_pvalue(digits = 3)) %>% 
    gtsummary::bold_p() 

table_3 <-
    gtsummary::tbl_merge(
    tbls = list(tbl_one, tbl_two), 
    tab_spanner = c("Univariate", "Multivariate"))

table_3
Characteristic
Univariate
Multivariate
N OR1 95% CI1 p-value OR1 95% CI1 p-value
Age(per 10 years) 628 1.26 1.05, 1.51 0.012 1.59 1.23, 2.11 <0.001
Sex 628





    Male


    Female
1.42 1.02, 1.96 0.036 1.47 1.02, 2.15 0.042
Genotype 624





    SCD-SS




    SCD-SC
0.73 0.51, 1.03 0.078


    S-beta thal
1.74 0.29, 13.3 0.546


Educational status 628





    Tertiary


    SHS/Vocational
1.64 1.08, 2.53 0.022 2.54 1.57, 4.20 <0.001
    JHS
5.12 3.12, 8.54 <0.001 7.61 4.26, 14.0 <0.001
    Basic
23.3 8.65, 81.5 <0.001 41.3 13.9, 156 <0.001
    None
15,765,440 0.00,
0.980 9,993,198 0.00,
0.977
Religion 628





    Christian


    Muslim
1.97 1.17, 3.36 0.012 1.46 0.81, 2.64 0.211
    None
0.00
0.980 0.00
0.992
Residential Status 622





    Urban


    Semi-urban
1.82 1.28, 2.59 <0.001 1.55 1.04, 2.31 0.029
    Rural
4.58 1.04, 31.5 0.064 2.76 0.52, 20.8 0.256
Diagnosis Pathway 624





    Non-NSP


    NSP
0.62 0.45, 0.86 0.004 0.75 0.52, 1.09 0.131
HU Usage 622 1.62 1.16, 2.28 0.005


    Yes




    No



1.51 1.03, 2.24 0.037
Penicillin Use 628 1.14 0.81, 1.60 0.441


Folic Acid Usage 627 1.59 0.62, 4.22 0.335


Temperature 597 1.20 0.79, 1.85 0.392


Pulse 582 1.01 0.99, 1.02 0.368


Respiratory Rate 537 0.99 0.99, 1.00 0.036


Oxygen Saturation 548 1.02 0.98, 1.07 0.337


Systolic Blood Pressure (mmHg) 550 0.99 0.97, 1.00 0.069


Diastolic Blood Pressure (mmHg) 550 0.99 0.98, 1.01 0.349


White Bolld Cell Count (10^-3ul) 159 0.97 0.88, 1.07 0.571


Hemoglobin (g/dl) 159 0.99 0.85, 1.14 0.871


Red Blood Cells Count (10^-6ul) 159 1.17 0.84, 1.63 0.360


MCV (fl) 158 0.96 0.94, 0.99 0.007


MCH (pg) 158 0.93 0.86, 0.99 0.033


MCHC 158 0.93 0.82, 1.05 0.268


Neutrophil count 152 1.01 0.94, 1.09 0.768


Platelet Count (10^-3ul) 158 1.00 1.00, 1.00 0.160


Total MOCA Score 628 0.00 0.00, 0.00 0.993


EQ-5D Health Status 628 0.99 0.98, 1.00 0.013 0.99 0.98, 1.00 0.041
1 OR = Odds Ratio, CI = Confidence Interval
Code
file.remove("sparco_moca_paper_table_3.docx")
[1] FALSE
Code
table_3 %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "sparco_moca_paper_table_3.docx")

Table 4: Linear Regression

Code
tbl_one <-
    df_for_moca %>%
    select(
        cal_age_recruit_yrs_2, sex,
        scd_test_result_ss_sbthal, hamd_total,
        edu_status, religion, res_status, diag_pathway,
        using_hydroxyurea, penicillin_v_prophylaxis,
        folic_acid, temp, pulse, resp_rate, sat, sbp,
        dbp, wbc_103ul, hb_g_dl, rbc_106ul, mcv_fl, mch_pg,
        mchc, neut, plt_103ul, moca_tot_score, eq_5d_health_status) %>%
gtsummary::tbl_uvregression(
    method = lm,
    y = moca_tot_score,
    exponentiate = FALSE,
    pvalue_fun = gtsummary::label_style_pvalue(digits = 3),
    show_single_row = c(using_hydroxyurea, penicillin_v_prophylaxis,
        folic_acid)) %>%
    gtsummary::bold_p() %>%
    gtsummary::bold_labels()

tbl_two <-
    df_for_moca %>%
    select(
        moca_tot_score, cal_age_recruit_yrs_2, sex, edu_status, 
        res_status, diag_pathway, using_hydroxyurea, 
        penicillin_v_prophylaxis, folic_acid, eq_5d_health_status) %>%
    lm(moca_tot_score ~ ., data = .) %>%
    gtsummary::tbl_regression(
        exponentiate = F,
        pvalue_fun = gtsummary::label_style_pvalue(digits = 3)) %>%
    gtsummary::bold_p() 

table_4 <- 
    gtsummary::tbl_merge(
    tbls = list(tbl_one, tbl_two),
    tab_spanner = c("Univariate", "Multivariate"))

table_4
Characteristic
Univariate
Multivariate
N Beta 95% CI1 p-value Beta 95% CI1 p-value
Age(per 10 years) 628 -1.0 -1.4, -0.58 <0.001 -1.1 -1.5, -0.69 <0.001
Sex 628





    Male


    Female
-0.91 -1.7, -0.10 0.027 -0.80 -1.5, -0.14 0.017
Genotype 624





    SCD-SS




    SCD-SC
0.11 -0.74, 0.97 0.794


    S-beta thal
0.26 -4.2, 4.7 0.909


Total HAMD 610 -0.06 -0.13, 0.01 0.113


Educational status 628





    Tertiary


    SHS/Vocational
-0.40 -1.3, 0.47 0.363 -1.5 -2.3, -0.68 <0.001
    JHS
-3.0 -4.1, -2.0 <0.001 -4.0 -5.0, -3.0 <0.001
    Basic
-8.2 -9.8, -6.6 <0.001 -9.7 -11, -8.3 <0.001
    None
-13 -17, -9.0 <0.001 -12 -15, -8.1 <0.001
Religion 628





    Christian




    Muslim
-0.47 -1.8, 0.84 0.480


    None
2.4 -7.5, 12 0.633


Residential Status 622





    Urban


    Semi-urban
-1.0 -1.9, -0.15 0.021 -0.34 -1.1, 0.38 0.353
    Rural
-2.8 -6.3, 0.73 0.121 -0.64 -3.5, 2.2 0.657
Diagnosis Pathway 624





    Non-NSP


    NSP
1.3 0.56, 2.1 <0.001 0.57 -0.09, 1.2 0.089
HU Usage 622 -1.0 -1.8, -0.20 0.015


    Yes




    No



-0.37 -1.1, 0.31 0.288
Penicillin Use 628 -1.0 -1.9, -0.20 0.016


    Yes




    No



-0.46 -1.2, 0.28 0.220
Folic Acid Usage 627 -3.7 -6.0, -1.3 0.002


    Yes




    No



-1.6 -3.6, 0.37 0.109
Temperature 597 -0.44 -1.5, 0.61 0.408


Pulse 582 -0.01 -0.04, 0.02 0.625


Respiratory Rate 537 0.00 -0.01, 0.02 0.639


Oxygen Saturation 548 -0.05 -0.16, 0.05 0.287


Systolic Blood Pressure (mmHg) 550 0.02 -0.01, 0.05 0.255


Diastolic Blood Pressure (mmHg) 550 -0.03 -0.07, 0.01 0.215


White Bolld Cell Count (10^-3ul) 159 0.06 -0.13, 0.25 0.520


Hemoglobin (g/dl) 159 -0.06 -0.34, 0.22 0.664


Red Blood Cells Count (10^-6ul) 159 -0.16 -0.81, 0.49 0.636


MCV (fl) 158 0.04 -0.01, 0.09 0.120


MCH (pg) 158 0.03 -0.10, 0.16 0.659


MCHC 158 0.02 -0.22, 0.26 0.856


Neutrophil count 152 -0.02 -0.17, 0.12 0.733


Platelet Count (10^-3ul) 158 0.00 0.00, 0.01 0.074


EQ-5D Health Status 628 0.03 0.01, 0.05 0.016 0.02 0.00, 0.04 0.044
1 CI = Confidence Interval
Code
file.remove("sparco_moca_paper_table_4.docx")
Warning in file.remove("sparco_moca_paper_table_4.docx"): cannot remove file
'sparco_moca_paper_table_4.docx', reason 'No such file or directory'
[1] FALSE
Code
table_4 %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "sparco_moca_paper_table_4.docx")