NTD Study

Author

Dr Samuel Blay Nguah

Read in data

Code
df_ntd_cases <- 
    readxl::read_xlsx("ntd-data.xlsx", sheet = 1) %>% 
    janitor::clean_names() %>% 
    mutate(
        case_control = rep("Case", by = nrow(.)),
        id = row_number(),
        presc = as.character(presc))

df_ntd_control <- 
    readxl::read_xlsx("ntd-data.xlsx", sheet = 2) %>% 
    janitor::clean_names() %>% 
    drop_na(bw) %>% 
    mutate(
        case_control = rep("Control", by = nrow(.)),
        id = row_number()+100,
        fa_start = as.character(fa_start),
        prev_ano = as.character(prev_ano),
        booking = as.character(booking))

df_ntd <-
    df_ntd_cases %>% 
    full_join(df_ntd_control)

df_ntd <- 
    df_ntd %>% 
    rename(
        bwt = bw,
        gestage = ga) %>% 
    mutate(
        sex = toupper(sex) %>% 
            factor(
                levels = c("F", "M"), 
                labels = c("Female", "Male")),
        type_gest = factor(
            type_gest, 
            levels = c("M","S"), c("Multiple", "Singleton")),
        mode_del = factor(mode_del),
        prev_ano = parse_integer(prev_ano),
        across(
            c(consanguinity, feb_ill, rash, herbal, alcohol, illicit_drugs, 
              anc_dx, smokin, prev_ano), 
            ~factor(.x, levels = c(0,1), labels = c("No", "Yes"))),
        case_control = factor(case_control),
        edu_level = stringr::str_to_sentence(edu_level) %>% 
            factor(),
        booking = parse_integer(booking),
        fa_start = parse_integer(fa_start),
        anc_attendance = case_when(
            anc_att == "non-att" ~ "Non-Attendant",
            anc_att == "non Attend" ~ "Non-Attendant",
            anc_att == "reg" ~ "Regular Attendant") %>% 
            factor(),
        anencephaly = case_when(
            anoma_ac1_ac34ly == "anencephaly" ~ "Yes", 
            case_control == "Case" ~ "No"),
        myelomen = case_when(
            str_detect(anoma_ac1_ac34ly, "MM") ~ "Yes", 
            case_control == "Case" ~ "No"),
        encephalocele = case_when(
            str_detect(anoma_ac1_ac34ly, "locele") ~ "Yes", 
            case_control == "Case" ~ "No"),
        hydroceph = case_when(
            str_detect(anoma_ac1_ac34ly, "HC") ~ "Yes", 
            case_control == "Case" ~ "No"),
        presc = case_when(presc == "0" ~ "No", TRUE ~ "Yes"),
        resid_mining = case_when(residence == "M" ~ "Yes", TRUE ~ "No"),
        resid_farming = case_when(residence == "F" ~ "Yes", TRUE ~ "No"),
        mat_dx = case_when(mat_dx == "0" ~ "No", TRUE ~ "Yes"),
        residence = factor(
            residence, 
            levels = c("C", "F", "M"),
            labels = c("None", "Farming","Mining")),
        case_control = factor(case_control, levels = c("Control", "Case"))
        ) %>% 
    select(-c(anc_att))

labelled::var_label(df_ntd) <-
    list(
        bwt = "Birth weight",
        gestage = "Gestational age",
        sex = "Sex",
        type_gest = "Gestation type",
        mode_del = "Delivery mode",
        consanguinity = "Consanguinity",
        mat_age = "Mother's age",
        edu_level = "Educational Level",
        booking = "Age at Booking ",
        anc_attendance = "ANC attendance",
        id = "Generate study ID",
        case_control = "Case or Control",
        parity = "Parity",
        herbal = "Herbal drug use",
        rash = "Rash",
        fa_start = "Folic Acid start",
        feb_ill = "Febirle illness",
        prev_ano = "Previous Anomalies",
        smokin = "Smoking",
        alcohol = "Alcohol use",
        illicit_drugs = "Illicit drug use",
        encephalocele = "Encephalocele",
        hydroceph = "Hydrocephalus",
        myelomen = "Myelomeningocele",
        anencephaly = "Anencephaly",
        unpres = "Unprescribed meds used",
        presc = "Prescribed meds use",
        resid_mining = "Mining area residence",
        resid_farming = "Farming area residence",
        mat_dx = "Maternal disease",
        residence = "Mining or Farming")

Table

Code
gtsummary::theme_gtsummary_compact()
Setting theme "Compact"
Code
table_1 <- 
    df_ntd %>% 
    select(
        bwt, gestage, sex, type_gest, mode_del, consanguinity, booking,
        mat_age, edu_level, feb_ill, rash, fa_start, herbal, mat_dx, 
        unpres, presc, smokin, alcohol,illicit_drugs, prev_ano, residence,
        resid_mining, resid_farming, anc_attendance, parity, 
        anc_dx, case_control) %>% 
    gtsummary::tbl_summary(
        by = case_control,
        type = list(parity ~ "continuous"),
        digits = list(
            gtsummary::all_continuous() ~ 1,
            gtsummary::all_categorical() ~ c(0,1),
            c(mat_age, gestage) ~ 0),
        statistic = list(gtsummary::all_categorical()~ "{n} ({p})")
        ) %>%
    gtsummary::add_overall(last =TRUE) %>% 
    gtsummary::add_p(
        pvalue_fun = function(x) gtsummary::style_pvalue(x, digits = 3)) %>% 
    gtsummary::bold_p() %>% 
    gtsummary::bold_labels()

table_1

Characteristic

Control
N = 196

1

Case
N = 97

1

Overall
N = 293

1

p-value

2
Birth weight 2.9 (2.4, 3.4) 2.8 (2.5, 3.2) 2.9 (2.4, 3.4) 0.544
Gestational age 38 (36, 39) 38 (37, 39) 38 (36, 39) 0.955
Sex


0.248
    Female 85 (43.4) 49 (50.5) 134 (45.7)
    Male 111 (56.6) 48 (49.5) 159 (54.3)
Gestation type


0.091
    Multiple 22 (11.2) 5 (5.2) 27 (9.2)
    Singleton 174 (88.8) 92 (94.8) 266 (90.8)
Delivery mode


0.619
    C/S 97 (49.5) 51 (52.6) 148 (50.5)
    SVD 99 (50.5) 46 (47.4) 145 (49.5)
Consanguinity 0 (0.0) 1 (1.0) 1 (0.3) 0.331
Age at Booking 8.0 (6.5, 11.0) 12.0 (8.0, 16.0) 10.0 (7.0, 12.0) <0.001
    Unknown 0 4 4
Mother's age 30 (26, 33) 29 (26, 33) 30 (26, 33) 0.798
Educational Level


<0.001
    None 9 (4.6) 19 (19.6) 28 (9.6)
    Primary 89 (45.4) 35 (36.1) 124 (42.3)
    Secondary 44 (22.4) 21 (21.6) 65 (22.2)
    Tertiary 54 (27.6) 22 (22.7) 76 (25.9)
Febirle illness 2 (1.0) 5 (5.2) 7 (2.4) 0.042
Rash 0 (0.0) 0 (0.0) 0 (0.0) >0.999
Folic Acid start 8.0 (6.5, 11.5) 12.0 (8.0, 17.0) 9.0 (7.0, 12.0) <0.001
    Unknown 0 4 4
Herbal drug use 13 (6.6) 33 (34.0) 46 (15.7) <0.001
Maternal disease 20 (10.2) 9 (9.3) 29 (9.9) 0.803
Unprescribed meds used 4 (2.0) 8 (8.2) 12 (4.1) 0.023
Prescribed meds use 6 (3.1) 7 (7.2) 13 (4.4) 0.132
Smoking 0 (0.0) 0 (0.0) 0 (0.0) >0.999
Alcohol use 0 (0.0) 1 (1.0) 1 (0.3) 0.331
Illicit drug use 0 (0.0) 0 (0.0) 0 (0.0) >0.999
Previous Anomalies 0 (0.0) 1 (1.2) 1 (0.4) 0.302
    Unknown 0 12 12
Mining or Farming


<0.001
    None 172 (87.8) 62 (63.9) 234 (79.9)
    Farming 9 (4.6) 22 (22.7) 31 (10.6)
    Mining 15 (7.7) 13 (13.4) 28 (9.6)
Mining area residence 15 (7.7) 13 (13.4) 28 (9.6) 0.115
Farming area residence 9 (4.6) 22 (22.7) 31 (10.6) <0.001
ANC attendance


0.017
    Non-Attendant 3 (1.5) 7 (7.2) 10 (3.4)
    Regular Attendant 193 (98.5) 90 (92.8) 283 (96.6)
Parity 3.0 (2.0, 3.0) 2.0 (1.0, 4.0) 2.0 (2.0, 3.0) 0.576
anc_dx 0 (0.0) 30 (30.9) 30 (10.2) <0.001
1

Median (Q1, Q3); n (%)

2

Wilcoxon rank sum test; Pearson’s Chi-squared test; Fisher’s exact test

Code
file.remove("ntd_table_1.docx")
[1] TRUE
Code
table_1 %>% 
    gtsummary::as_gt() %>% 
    gt::gtsave(filename = "ntd_table_1.docx") 

Multivariate table

Code
df_ntd %>% 
    glm(
        case_control ~ edu_level + feb_ill + fa_start + herbal + 
            unpres + resid_farming + anc_attendance, 
        family="binomial",
        data = .) %>% 
    gtsummary::tbl_regression(
        exponentiate = T,
        pvalue_fun = function(x) gtsummary::style_pvalue(x, digits = 3)
    ) %>%
    gtsummary::bold_labels() %>% 
    gtsummary::bold_p()

Characteristic

OR

1

95% CI

1

p-value

Educational Level


    None
    Primary 0.46 0.14, 1.48 0.189
    Secondary 0.64 0.18, 2.28 0.483
    Tertiary 0.89 0.26, 3.15 0.850
Febirle illness


    No
    Yes 3.46 0.50, 29.6 0.211
Folic Acid start 1.16 1.09, 1.23 <0.001
Herbal drug use


    No
    Yes 4.25 1.89, 9.84 <0.001
Unprescribed meds used 1.70 0.33, 8.52 0.509
Farming area residence


    No
    Yes 3.66 1.30, 10.6 0.015
ANC attendance


    Non-Attendant
    Regular Attendant 1.86 0.22, 18.0 0.577
1

OR = Odds Ratio, CI = Confidence Interval