Pregnancy Outcome

Author

Samuel Blay Nguah

Read in Data

Code
df_preg_outc <- 
    readxl::read_xls("./Data/preg outcome_used.xls") %>% 
    janitor::clean_names() %>% 
    rename(educ =  highestedulevel) %>% 
    mutate(
        educ = case_when(
            educ == "Teacher Training College" ~ "TTC",
            educ == "SS" ~ "SHS",
            TRUE ~ educ),
        educ = factor(educ, levels = c("JHS","SHS","TTC")),
        typeofdm = factor(typeofdm),
        bloodglucontrol = factor(
            bloodglucontrol, 
            levels = c("few within","some within", "most within")),
        apgar_cat  = case_when(
            apgar_score_5 <= 7 ~ "6-7",
            apgar_score_5 > 7 ~ "8-10"
        )) 

df_preg_outc %>% summarytools::dfSummary() %>% summarytools::stview()
Switching method to 'browser'
Output file written: C:\Users\sbngu\AppData\Local\Temp\RtmpeiAGJy\file70c6fc33651.html

Analysis

Code
gtsummary::theme_gtsummary_compact()
df_preg_outc %>% 
    select(
        educ, married, manresponsible, birth_weight, apgar_cat, 
        agediagnosis, agepregncy, bloodglucontrol, abort_attempt, 
        abortion_method, pregncyplanned, gestation, modeofdelivery, ) %>% 
    gtsummary::tbl_summary(
    by = apgar_cat,
    digits = list(
        gtsummary::all_categorical() ~ c(0,1),
        gtsummary::all_continuous() ~ 1),
    type = list(
        c(agepregncy, agediagnosis) ~ "continuous"),
    label = list(
        educ = "Educational Level",
        married = "Marital Status",
        manresponsible = "Contribution by spouse",
        birth_weight = "Birth Weight (kgs)",
        agediagnosis = "Age at diagnosis",
        agepregncy = "Age at Pregnancy",
        bloodglucontrol = "Blood Glucose Control",
        abort_attempt = "Abortion attempted",
        abortion_method = "Method of Abortion",
        pregncyplanned = "Was pregnancy planned?",
        gestation = "Gestation",
        modeofdelivery = "Mode of Delivery")) %>% 
        gtsummary::add_overall(last=TRUE) %>%
    gtsummary::add_p(
        test.args = gtsummary::all_tests("t.test") ~ 
            "simulate.p.value T",
        test = gtsummary::all_categorical() ~ "fisher.test") %>% 
    gtsummary::bold_labels()
Characteristic 6-7
N = 81
8-10
N = 101
Overall
N = 181
p-value2
Educational Level


>0.9
    JHS 2 (33.3%) 4 (40.0%) 6 (37.5%)
    SHS 3 (50.0%) 5 (50.0%) 8 (50.0%)
    TTC 1 (16.7%) 1 (10.0%) 2 (12.5%)
    Unknown 2 0 2
Marital Status


>0.9
    cohabiting 1 (16.7%) 1 (10.0%) 2 (12.5%)
    no 4 (66.7%) 7 (70.0%) 11 (68.8%)
    yes 1 (16.7%) 2 (20.0%) 3 (18.8%)
    Unknown 2 0 2
Contribution by spouse


>0.9
    irregular 1 (16.7%) 1 (10.0%) 2 (12.5%)
    no 3 (50.0%) 6 (60.0%) 9 (56.3%)
    yes 2 (33.3%) 3 (30.0%) 5 (31.3%)
    Unknown 2 0 2
Birth Weight (kgs) 2.6 (2.2, 2.7) 3.3 (2.7, 3.7) 2.8 (2.5, 3.6) 0.029
Age at diagnosis 11.0 (9.0, 13.0) 10.5 (9.0, 13.0) 10.5 (9.0, 13.0) >0.9
    Unknown 2 0 2
Age at Pregnancy 18.0 (14.0, 20.0) 19.0 (16.0, 20.0) 18.0 (16.0, 20.0) 0.5
    Unknown 2 0 2
Blood Glucose Control


0.5
    few within 1 (16.7%) 0 (0.0%) 1 (6.3%)
    some within 1 (16.7%) 3 (30.0%) 4 (25.0%)
    most within 4 (66.7%) 7 (70.0%) 11 (68.8%)
    Unknown 2 0 2
Abortion attempted 6 (100.0%) 7 (70.0%) 13 (81.3%) 0.3
    Unknown 2 0 2
Method of Abortion


0.021
    concotion 2 (33.3%) 7 (100.0%) 9 (69.2%)
    tablets 4 (66.7%) 0 (0.0%) 4 (30.8%)
    Unknown 2 3 5
Was pregnancy planned? 0 (0.0%) 1 (10.0%) 1 (6.3%) >0.9
    Unknown 2 0 2
Gestation


0.3
    preterm 3 (37.5%) 1 (10.0%) 4 (22.2%)
    term 5 (62.5%) 9 (90.0%) 14 (77.8%)
Mode of Delivery


>0.9
    cs 3 (50.0%) 6 (60.0%) 9 (56.3%)
    svd 3 (50.0%) 4 (40.0%) 7 (43.8%)
    Unknown 2 0 2
1 n (%); Median (Q1, Q3)
2 Fisher’s exact test; Wilcoxon rank sum test