This analysis syntax use the master dataset down below with a few features: - no consented patients removed; - donors who could’ve been ruled out by breeze is marked as ‘Yes’ by the variable early_ruleout; - N = 2934, with 273 that could’ve been ruled out early.
df <- read.csv("./Data/MFLADD_survey1&2_masterfile.csv", header = T)
var <- Cs(age, sex, race, language,education_level, early_ruleout)
facvar <- Cs(sex, race,language,education_level,early_ruleout)
table1 <- CreateTableOne(var, factorVars = facvar,data = df)
table1 <- print(table1, printToggle = F)
write.csv(table1, file = "./Output/Survey 1 patient characteristics.csv")
table1 %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
select(Variables, `N (%)` = Overall) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics, Baseline (N = 2934) | |
Variables | N (%) |
age (mean (sd)) | 44.04 (13.32) |
sex = Male (%) | 888 (38.9) |
race (%) |
|
Asian | 232 ( 8.1) |
Black | 511 (17.8) |
Hispanic | 583 (20.3) |
Other/Unknown | 187 ( 6.5) |
White | 1358 (47.3) |
language (%) |
|
English | 2005 (95.3) |
Other | 4 ( 0.2) |
Spanish | 95 ( 4.5) |
education_level (%) |
|
| 75 ( 2.6) |
8th grade or less | 70 ( 2.4) |
Associate's or bachelor's degree | 814 (27.7) |
High school degree or equivalent (GED) | 509 (17.3) |
Professional or graduate degree | 549 (18.7) |
Some college credit, no degree | 687 (23.4) |
Some high school, no degree | 102 ( 3.5) |
Some professional or graduate school, no degree | 128 ( 4.4) |
early_ruleout = Yes (%) | 273 ( 9.3) |
# kable(caption = "Table 1. Participant Characteristics (N = 2982)") %>%
# kable_styling(bootstrap_options = c("striped", "hover", "condensed","responsive"),full_width = FALSE)
# by race
table1_byrace <- CreateTableOne(var, strata = "race",factorVars = facvar,data = df %>% filter(! race == "Other/Unknown"))
table1_byrace <- print(table1_byrace, printToggle = F)
table1_byrace %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics by race, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics by race, Baseline (N = 2934) | ||||||
Variables | Asian | Black | Hispanic | White | p | test |
age (mean (sd)) | 42.57 (13.15) | 41.71 (13.52) | 40.64 (11.44) | 46.86 (13.36) | <0.001 | |
sex = Male (%) | 60 ( 34.5) | 208 ( 45.2) | 157 ( 43.6) | 401 ( 36.1) | 0.001 | |
race (%) |
|
|
|
| <0.001 | |
Asian | 232 (100.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | ||
Black | 0 ( 0.0) | 511 (100.0) | 0 ( 0.0) | 0 ( 0.0) | ||
Hispanic | 0 ( 0.0) | 0 ( 0.0) | 583 (100.0) | 0 ( 0.0) | ||
White | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 1358 (100.0) | ||
language (%) |
|
|
|
| <0.001 | |
English | 157 ( 97.5) | 425 ( 99.5) | 223 ( 76.1) | 1064 ( 98.9) | ||
Other | 4 ( 2.5) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | ||
Spanish | 0 ( 0.0) | 2 ( 0.5) | 70 ( 23.9) | 12 ( 1.1) | ||
education_level (%) |
|
|
|
| <0.001 | |
| 2 ( 0.9) | 16 ( 3.1) | 15 ( 2.6) | 31 ( 2.3) | ||
8th grade or less | 6 ( 2.6) | 3 ( 0.6) | 37 ( 6.3) | 14 ( 1.0) | ||
Associate's or bachelor's degree | 88 ( 37.9) | 121 ( 23.7) | 113 ( 19.4) | 433 ( 31.9) | ||
High school degree or equivalent (GED) | 23 ( 9.9) | 118 ( 23.1) | 139 ( 23.8) | 185 ( 13.6) | ||
Professional or graduate degree | 68 ( 29.3) | 60 ( 11.7) | 63 ( 10.8) | 313 ( 23.0) | ||
Some college credit, no degree | 35 ( 15.1) | 154 ( 30.1) | 147 ( 25.2) | 287 ( 21.1) | ||
Some high school, no degree | 2 ( 0.9) | 20 ( 3.9) | 53 ( 9.1) | 19 ( 1.4) | ||
Some professional or graduate school, no degree | 8 ( 3.4) | 19 ( 3.7) | 16 ( 2.7) | 76 ( 5.6) | ||
early_ruleout = Yes (%) | 11 ( 4.7) | 81 ( 15.9) | 45 ( 7.7) | 112 ( 8.2) | <0.001 | |
write.csv(table1_byrace, "./Output/table patient characteristics by race ethnicity.csv")
# by who passed breeze or breeze like screening
table1_pre <- CreateTableOne(var, strata = "early_ruleout",factorVars = facvar,data = df )
table1_pre <- print(table1_pre, printToggle = F)
table1_pre %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics by early_ruleout, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics by early_ruleout, Baseline (N = 2934) | ||||
Variables | No | Yes | p | test |
age (mean (sd)) | 43.99 (13.29) | 45.94 (14.64) | 0.384 | |
sex = Male (%) | 808 (39.5) | 80 ( 33.6) | 0.090 | |
race (%) |
|
| <0.001 | |
Asian | 221 ( 8.5) | 11 ( 4.0) | ||
Black | 430 (16.6) | 81 ( 29.7) | ||
Hispanic | 538 (20.7) | 45 ( 16.5) | ||
Other/Unknown | 163 ( 6.3) | 24 ( 8.8) | ||
White | 1246 (48.0) | 112 ( 41.0) | ||
language (%) |
|
| 0.004 | |
English | 1802 (94.8) | 203 (100.0) | ||
Other | 4 ( 0.2) | 0 ( 0.0) | ||
Spanish | 95 ( 5.0) | 0 ( 0.0) | ||
education_level (%) |
|
| 0.003 | |
| 62 ( 2.3) | 13 ( 4.8) | ||
8th grade or less | 64 ( 2.4) | 6 ( 2.2) | ||
Associate's or bachelor's degree | 745 (28.0) | 69 ( 25.3) | ||
High school degree or equivalent (GED) | 454 (17.1) | 55 ( 20.1) | ||
Professional or graduate degree | 516 (19.4) | 33 ( 12.1) | ||
Some college credit, no degree | 622 (23.4) | 65 ( 23.8) | ||
Some high school, no degree | 86 ( 3.2) | 16 ( 5.9) | ||
Some professional or graduate school, no degree | 112 ( 4.2) | 16 ( 5.9) | ||
early_ruleout = Yes (%) | 0 ( 0.0) | 273 (100.0) | <0.001 | |
write.csv(table1_pre, "./Output/table patient characteristics by pre breeze screen.csv")
# by patient relationship
table1_rel <- CreateTableOne(var, strata = "recip_rel",factorVars = facvar,data = df )
table1_rel <- print(table1_rel, printToggle = F)
table1_rel %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics by relationship with recipient, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics by relationship with recipient, Baseline (N = 2934) | |||||||||||
Variables | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center | p | test |
age (mean (sd)) | 42.50 (13.19) | 42.52 (13.87) | 44.65 (12.65) | 48.84 (12.29) | 43.92 (11.81) | 32.38 (8.33) | 49.25 (11.78) | 46.45 (13.46) | 50.71 (13.41) | <0.001 | |
sex = Male (%) | 71 (42.5) | 62 (47.7) | 159 (46.1) | 37 (34.9) | 134 (32.1) | 184 (48.0) | 128 (34.9) | 31 (35.6) | 9 ( 42.9) | <0.001 | |
race (%) |
|
|
|
|
|
|
|
|
| <0.001 | |
Asian | 9 ( 5.2) | 6 ( 4.7) | 23 ( 6.6) | 10 ( 8.6) | 8 ( 1.9) | 19 ( 4.9) | 42 (11.3) | 5 ( 5.7) | 0 ( 0.0) | ||
Black | 54 (31.4) | 23 (17.8) | 90 (26.0) | 21 (18.1) | 53 (12.6) | 130 (33.6) | 65 (17.5) | 14 (16.1) | 1 ( 4.8) | ||
Hispanic | 30 (17.4) | 18 (14.0) | 75 (21.7) | 42 (36.2) | 54 (12.8) | 71 (18.3) | 55 (14.8) | 19 (21.8) | 1 ( 4.8) | ||
Other/Unknown | 17 ( 9.9) | 10 ( 7.8) | 30 ( 8.7) | 11 ( 9.5) | 32 ( 7.6) | 22 ( 5.7) | 28 ( 7.5) | 5 ( 5.7) | 0 ( 0.0) | ||
White | 62 (36.0) | 72 (55.8) | 128 (37.0) | 32 (27.6) | 274 (65.1) | 145 (37.5) | 182 (48.9) | 44 (50.6) | 19 ( 90.5) | ||
language (%) |
|
|
|
|
|
|
|
|
| NaN | |
English | 147 (94.8) | 114 (96.6) | 285 (91.9) | 75 (83.3) | 383 (98.2) | 345 (97.5) | 311 (94.8) | 77 (93.9) | 20 (100.0) | ||
Other | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | ||
Spanish | 8 ( 5.2) | 4 ( 3.4) | 25 ( 8.1) | 15 (16.7) | 7 ( 1.8) | 9 ( 2.5) | 17 ( 5.2) | 5 ( 6.1) | 0 ( 0.0) | ||
education_level (%) |
|
|
|
|
|
|
|
|
| <0.001 | |
| 7 ( 4.1) | 3 ( 2.3) | 5 ( 1.4) | 9 ( 7.8) | 15 ( 3.6) | 14 ( 3.6) | 11 ( 3.0) | 2 ( 2.3) | 1 ( 4.8) | ||
8th grade or less | 1 ( 0.6) | 2 ( 1.5) | 21 ( 6.0) | 19 (16.4) | 7 ( 1.7) | 3 ( 0.8) | 11 ( 3.0) | 1 ( 1.1) | 0 ( 0.0) | ||
Associate's or bachelor's degree | 39 (22.7) | 35 (26.9) | 83 (23.9) | 17 (14.7) | 125 (29.7) | 121 (31.3) | 93 (25.0) | 22 (25.3) | 6 ( 28.6) | ||
High school degree or equivalent (GED) | 40 (23.3) | 30 (23.1) | 68 (19.5) | 27 (23.3) | 74 (17.6) | 69 (17.8) | 79 (21.2) | 18 (20.7) | 3 ( 14.3) | ||
Professional or graduate degree | 32 (18.6) | 20 (15.4) | 52 (14.9) | 10 ( 8.6) | 81 (19.2) | 47 (12.1) | 80 (21.5) | 18 (20.7) | 6 ( 28.6) | ||
Some college credit, no degree | 35 (20.3) | 30 (23.1) | 78 (22.4) | 24 (20.7) | 92 (21.9) | 106 (27.4) | 70 (18.8) | 20 (23.0) | 2 ( 9.5) | ||
Some high school, no degree | 8 ( 4.7) | 6 ( 4.6) | 25 ( 7.2) | 7 ( 6.0) | 3 ( 0.7) | 13 ( 3.4) | 12 ( 3.2) | 5 ( 5.7) | 0 ( 0.0) | ||
Some professional or graduate school, no degree | 10 ( 5.8) | 4 ( 3.1) | 16 ( 4.6) | 3 ( 2.6) | 24 ( 5.7) | 14 ( 3.6) | 16 ( 4.3) | 1 ( 1.1) | 3 ( 14.3) | ||
early_ruleout = Yes (%) | 23 (13.4) | 15 (11.5) | 56 (16.1) | 12 (10.3) | 46 (10.9) | 39 (10.1) | 37 ( 9.9) | 5 ( 5.7) | 2 ( 9.5) | 0.123 | |
write.csv(table1_pre, "./Output/table patient characteristics by relationship.csv")
This table includes an overview of almost all survey 1 variables except recip_rel_other that includes hand inputed donor-patient relationships that takes time to clean up.
(hidden)
# get survey 1 col names only
# url <- "https://ctrcapps.medsch.ucla.edu/redcap/api/"
# token <- "C45ACB19BB992A10844BCA4C89E36BC1"
# con <- redcapConnection(url = url, token = token)
#
# mfl_2 <- exportRecords(con, factor=FALSE, forms = c('donor_survey_1')) #,'donor_outcomes'
var <- df %>% select(
date_ds1:donor_survey_1_complete,
-matches("_date|_dt|cc_race|mrn|first|last|address|_num|date_|___|recip_rel_other")
) %>% names()
table1 <- CreateTableOne(var,data = df)
table1 <- print(table1,quote = F, showAlllevels=T, printToggle = F, noSpaces = F)
table1
# table1 %>% as.data.frame() %>%
# datatable(filter = 'bottom', options = list(pageLength = 10))
write.csv(table1, file = "./Output/Survey 1 questions overview.csv")
#
# # output to word format
# ft2 <- table1 %>%
# as.data.frame() %>%
# rownames_to_column("Variables") %>%
# filter(!Variables %in% c("n", " ")) %>%
# mutate(Variables = gsub("X...", " ", Variables) )%>%
# select(Variables, `N (%)` = Overall) %>%
# flextable::flextable() %>%
# autofit(add_w = 0.3) %>%
# align(align = "left") %>%
# align(align = "left", part = "header") %>%
# add_header_lines("Survey questions, Baseline (N = 2982)") %>%
# fontsize( size = 14, part = "header") %>%
# fontsize( size = 12, part = "body")
#
# print(ft2, preview = "docx")
### overview by race/ethnicity
# table2 <- CreateTableOne(var,strata = "race",data = df %>% filter(! race == "Other/Unknown"))
# table2 <- print(table2,quote = F, showAlllevels=T, printToggle = F, noSpaces = F)
#
# # table1 %>% as.data.frame() %>%
# # datatable(filter = 'bottom', options = list(pageLength = 10))
#
# write.csv(table2, file = "./Output/Survey 1 questions overview by race.csv")
mot_better: By donating, I could make someone’s life better.
mot_belief: Donating could help my recipient live longer and have the freedom to do what is important.
mot_proud: Donating will make me feel proud of myself;
mot_benefit: I believe that donating will benefit the recipient’s entire family.
mot_helpfam: I believe that I should help my family and friends.
var_motivation <- df %>% select(starts_with("mot_"), -contains("_nolabel")) %>% names()
# df0 <- data.frame()
# df.new <- lapply(df[var_motivation], function(x) tabyl(x) %>% adorn_pct_formatting() %>% rbind(.,df0))
#
#
# df_df <- do.call(rbind, df.new) %>%
# rownames_to_column("Motivations") %>%
# select(
# Motivations, levels = x, n, valid_percent
# )
#
# df_df %>% flextable() %>% autofit(add_w = 0.3)
table.moti <- CreateTableOne(var_motivation, data=df %>% filter(! race == "Other/Unknown" ))
table.moti <- print(table.moti, printToggle = F)
table.moti %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
select(Variables, `N (%)` = Overall) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics, Baseline (N = 2934) | |
Variables | N (%) |
mot_better.... | |
X...Extremely.important | 2333 (88.9) |
X...Important | 266 (10.1) |
X...Not.at.all.important | 8 ( 0.3) |
X...Slightly.important | 18 ( 0.7) |
mot_belief.... | |
X...Extremely.important.1 | 1364 (52.4) |
X...Important.1 | 693 (26.6) |
X...Not.at.all.important.1 | 291 (11.2) |
X...Slightly.important.1 | 257 ( 9.9) |
mot_longer.... | |
X...Extremely.important.2 | 2407 (91.4) |
X...Important.2 | 217 ( 8.2) |
X...Not.at.all.important.2 | 5 ( 0.2) |
X...Slightly.important.2 | 5 ( 0.2) |
mot_proud.... | |
X...Extremely.important.3 | 805 (30.9) |
X...Important.3 | 459 (17.6) |
X...Not.at.all.important.3 | 781 (30.0) |
X...Slightly.important.3 | 561 (21.5) |
mot_benefit.... | |
X...Extremely.important.4 | 2158 (82.4) |
X...Important.4 | 360 (13.8) |
X...Not.at.all.important.4 | 32 ( 1.2) |
X...Slightly.important.4 | 68 ( 2.6) |
mot_helpfam.... | |
X...Extremely.important.5 | 2026 (77.9) |
X...Important.5 | 482 (18.5) |
X...Not.at.all.important.5 | 25 ( 1.0) |
X...Slightly.important.5 | 69 ( 2.7) |
yujieR::pubtableone(df %>% filter(! race == "Other/Unknown" ),var_motivation, var_motivation, "race")
Table x: header-here | ||||||
Variables | Asian | Black | Hispanic | Other/Unknown | White | p |
n | 232 | 511 | 583 | 0 | 1358 | |
mot_better.... | - | NaN | ||||
X...Extremely.important | 201 (88.9) | 430 (87.0) | 494 (86.5) | - | 1208 (90.6) | |
X...Important | 23 (10.2) | 58 (11.7) | 70 (12.3) | - | 115 ( 8.6) | |
X...Not.at.all.important | 0 ( 0.0) | 3 ( 0.6) | 0 ( 0.0) | - | 5 ( 0.4) | |
X...Slightly.important | 2 ( 0.9) | 3 ( 0.6) | 7 ( 1.2) | - | 6 ( 0.4) | |
mot_belief.... | - | NaN | ||||
X...Extremely.important.1 | 125 (55.3) | 283 (58.5) | 301 (53.5) | - | 655 (49.2) | |
X...Important.1 | 57 (25.2) | 129 (26.7) | 166 (29.5) | - | 341 (25.6) | |
X...Not.at.all.important.1 | 17 ( 7.5) | 33 ( 6.8) | 61 (10.8) | - | 180 (13.5) | |
X...Slightly.important.1 | 27 (11.9) | 39 ( 8.1) | 35 ( 6.2) | - | 156 (11.7) | |
mot_longer.... | - | NaN | ||||
X...Extremely.important.2 | 203 (89.4) | 449 (90.3) | 524 (91.1) | - | 1231 (92.2) | |
X...Important.2 | 24 (10.6) | 45 ( 9.1) | 49 ( 8.5) | - | 99 ( 7.4) | |
X...Not.at.all.important.2 | 0 ( 0.0) | 2 ( 0.4) | 0 ( 0.0) | - | 3 ( 0.2) | |
X...Slightly.important.2 | 0 ( 0.0) | 1 ( 0.2) | 2 ( 0.3) | - | 2 ( 0.1) | |
mot_proud.... | - | NaN | ||||
X...Extremely.important.3 | 87 (38.8) | 224 (46.3) | 225 (39.5) | - | 269 (20.2) | |
X...Important.3 | 33 (14.7) | 89 (18.4) | 118 (20.7) | - | 219 (16.5) | |
X...Not.at.all.important.3 | 67 (29.9) | 113 (23.3) | 126 (22.1) | - | 475 (35.7) | |
X...Slightly.important.3 | 37 (16.5) | 58 (12.0) | 100 (17.6) | - | 366 (27.5) | |
mot_benefit.... | - | NaN | ||||
X...Extremely.important.4 | 188 (82.8) | 404 (82.4) | 471 (82.6) | - | 1095 (82.3) | |
X...Important.4 | 30 (13.2) | 71 (14.5) | 83 (14.6) | - | 176 (13.2) | |
X...Not.at.all.important.4 | 1 ( 0.4) | 7 ( 1.4) | 4 ( 0.7) | - | 20 ( 1.5) | |
X...Slightly.important.4 | 8 ( 3.5) | 8 ( 1.6) | 12 ( 2.1) | - | 40 ( 3.0) | |
mot_helpfam.... | - | NaN | ||||
X...Extremely.important.5 | 176 (78.6) | 387 (79.5) | 438 (77.5) | - | 1025 (77.3) | |
X...Important.5 | 40 (17.9) | 85 (17.5) | 113 (20.0) | - | 244 (18.4) | |
X...Not.at.all.important.5 | 2 ( 0.9) | 4 ( 0.8) | 1 ( 0.2) | - | 18 ( 1.4) | |
X...Slightly.important.5 | 6 ( 2.7) | 11 ( 2.3) | 13 ( 2.3) | - | 39 ( 2.9) | |
footer-here | ||||||
table.motiByRace <- CreateTableOne(var_motivation, strata = "race", data=df %>% filter(! race == "Other/Unknown" ))
table.motiByRace <- print(table.motiByRace, printToggle = F)
write.csv(table.motiByRace, "./Output/table motivation by race ethnicity.csv")
# by who passed breeze or breeze like screening
yujieR::pubtableone(df,var_motivation, var_motivation, "early_ruleout")
Table x: header-here | |||
Variables | No | Yes | p |
n | 2661 | 273 | |
mot_better.... | 0.044 | ||
X...Extremely.important | 2313 (89.1) | 237 (87.5) | |
X...Important | 262 (10.1) | 27 (10.0) | |
X...Not.at.all.important | 7 ( 0.3) | 2 ( 0.7) | |
X...Slightly.important | 14 ( 0.5) | 5 ( 1.8) | |
mot_belief.... | 0.146 | ||
X...Extremely.important.1 | 1337 (51.9) | 151 (56.8) | |
X...Important.1 | 707 (27.4) | 57 (21.4) | |
X...Not.at.all.important.1 | 278 (10.8) | 34 (12.8) | |
X...Slightly.important.1 | 254 ( 9.9) | 24 ( 9.0) | |
mot_longer.... | 0.303 | ||
X...Extremely.important.2 | 2372 (91.0) | 246 (91.4) | |
X...Important.2 | 224 ( 8.6) | 20 ( 7.4) | |
X...Not.at.all.important.2 | 5 ( 0.2) | 2 ( 0.7) | |
X...Slightly.important.2 | 6 ( 0.2) | 1 ( 0.4) | |
mot_proud.... | 0.226 | ||
X...Extremely.important.3 | 785 (30.4) | 96 (36.0) | |
X...Important.3 | 470 (18.2) | 39 (14.6) | |
X...Not.at.all.important.3 | 772 (29.9) | 78 (29.2) | |
X...Slightly.important.3 | 552 (21.4) | 54 (20.2) | |
mot_benefit.... | 0.249 | ||
X...Extremely.important.4 | 2122 (81.9) | 225 (84.6) | |
X...Important.4 | 370 (14.3) | 29 (10.9) | |
X...Not.at.all.important.4 | 34 ( 1.3) | 2 ( 0.8) | |
X...Slightly.important.4 | 66 ( 2.5) | 10 ( 3.8) | |
mot_helpfam.... | 0.808 | ||
X...Extremely.important.5 | 2004 (77.8) | 203 (76.3) | |
X...Important.5 | 477 (18.5) | 51 (19.2) | |
X...Not.at.all.important.5 | 31 ( 1.2) | 3 ( 1.1) | |
X...Slightly.important.5 | 63 ( 2.4) | 9 ( 3.4) | |
footer-here | |||
table1_pre_mot <- CreateTableOne(var_motivation, strata = "early_ruleout",factorVars = facvar,data = df )
table1_pre_mot <- print(table1_pre_mot, printToggle = F)
write.csv(table1_pre_mot, "./Output/table motivation by pre breeze screen.csv")
# by relationship
yujieR::pubtableone(df,var_motivation, var_motivation, "recip_rel")
Table x: header-here | ||||||||||
Variables | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center | p |
n | 172 | 130 | 348 | 116 | 421 | 387 | 372 | 87 | 21 | |
mot_better.... | 0.662 | |||||||||
X...Extremely.important | 144 (86.2) | 108 (85.7) | 298 (87.1) | 97 (88.2) | 377 (91.7) | 328 (87.0) | 313 (88.7) | 71 (82.6) | 20 (95.2) | |
X...Important | 21 (12.6) | 15 (11.9) | 39 (11.4) | 13 (11.8) | 33 ( 8.0) | 43 (11.4) | 34 ( 9.6) | 15 (17.4) | 1 ( 4.8) | |
X...Not.at.all.important | 1 ( 0.6) | 1 ( 0.8) | 1 ( 0.3) | 0 ( 0.0) | 0 ( 0.0) | 3 ( 0.8) | 2 ( 0.6) | 0 ( 0.0) | 0 ( 0.0) | |
X...Slightly.important | 1 ( 0.6) | 2 ( 1.6) | 4 ( 1.2) | 0 ( 0.0) | 1 ( 0.2) | 3 ( 0.8) | 4 ( 1.1) | 0 ( 0.0) | 0 ( 0.0) | |
mot_belief.... | 0.022 | |||||||||
X...Extremely.important.1 | 83 (50.3) | 59 (48.0) | 174 (51.2) | 62 (56.4) | 237 (57.7) | 175 (46.7) | 188 (54.8) | 47 (54.7) | 13 (61.9) | |
X...Important.1 | 47 (28.5) | 37 (30.1) | 88 (25.9) | 39 (35.5) | 96 (23.4) | 101 (26.9) | 95 (27.7) | 23 (26.7) | 7 (33.3) | |
X...Not.at.all.important.1 | 21 (12.7) | 18 (14.6) | 47 (13.8) | 6 ( 5.5) | 44 (10.7) | 47 (12.5) | 33 ( 9.6) | 7 ( 8.1) | 0 ( 0.0) | |
X...Slightly.important.1 | 14 ( 8.5) | 9 ( 7.3) | 31 ( 9.1) | 3 ( 2.7) | 34 ( 8.3) | 52 (13.9) | 27 ( 7.9) | 9 (10.5) | 1 ( 4.8) | |
mot_longer.... | 0.019 | |||||||||
X...Extremely.important.2 | 152 (91.6) | 113 (89.0) | 317 (92.2) | 106 (93.8) | 368 (89.1) | 348 (91.1) | 329 (92.7) | 69 (80.2) | 18 (85.7) | |
X...Important.2 | 13 ( 7.8) | 14 (11.0) | 24 ( 7.0) | 7 ( 6.2) | 45 (10.9) | 33 ( 8.6) | 23 ( 6.5) | 15 (17.4) | 3 (14.3) | |
X...Not.at.all.important.2 | 1 ( 0.6) | 0 ( 0.0) | 1 ( 0.3) | 0 ( 0.0) | 0 ( 0.0) | 1 ( 0.3) | 2 ( 0.6) | 0 ( 0.0) | 0 ( 0.0) | |
X...Slightly.important.2 | 0 ( 0.0) | 0 ( 0.0) | 2 ( 0.6) | 0 ( 0.0) | 0 ( 0.0) | 0 ( 0.0) | 1 ( 0.3) | 2 ( 2.3) | 0 ( 0.0) | |
mot_proud.... | 0.009 | |||||||||
X...Extremely.important.3 | 59 (35.5) | 41 (33.1) | 120 (35.4) | 52 (46.8) | 114 (27.6) | 151 (40.3) | 116 (33.9) | 24 (27.9) | 6 (30.0) | |
X...Important.3 | 26 (15.7) | 20 (16.1) | 57 (16.8) | 19 (17.1) | 77 (18.6) | 61 (16.3) | 67 (19.6) | 21 (24.4) | 5 (25.0) | |
X...Not.at.all.important.3 | 54 (32.5) | 36 (29.0) | 108 (31.9) | 32 (28.8) | 125 (30.3) | 89 (23.7) | 101 (29.5) | 24 (27.9) | 4 (20.0) | |
X...Slightly.important.3 | 27 (16.3) | 27 (21.8) | 54 (15.9) | 8 ( 7.2) | 97 (23.5) | 74 (19.7) | 58 (17.0) | 17 (19.8) | 5 (25.0) | |
mot_benefit.... | 0.233 | |||||||||
X...Extremely.important.4 | 137 (83.0) | 105 (82.7) | 290 (84.8) | 93 (83.8) | 340 (82.5) | 328 (87.0) | 288 (83.2) | 67 (77.9) | 17 (85.0) | |
X...Important.4 | 23 (13.9) | 20 (15.7) | 44 (12.9) | 16 (14.4) | 63 (15.3) | 41 (10.9) | 46 (13.3) | 16 (18.6) | 1 ( 5.0) | |
X...Not.at.all.important.4 | 1 ( 0.6) | 0 ( 0.0) | 3 ( 0.9) | 1 ( 0.9) | 2 ( 0.5) | 4 ( 1.1) | 8 ( 2.3) | 2 ( 2.3) | 0 ( 0.0) | |
X...Slightly.important.4 | 4 ( 2.4) | 2 ( 1.6) | 5 ( 1.5) | 1 ( 0.9) | 7 ( 1.7) | 4 ( 1.1) | 4 ( 1.2) | 1 ( 1.2) | 2 (10.0) | |
mot_helpfam.... | 0.455 | |||||||||
X...Extremely.important.5 | 126 (76.4) | 98 (79.7) | 281 (82.9) | 84 (76.4) | 314 (76.0) | 310 (82.0) | 272 (79.3) | 64 (75.3) | 17 (85.0) | |
X...Important.5 | 37 (22.4) | 21 (17.1) | 50 (14.7) | 25 (22.7) | 89 (21.5) | 62 (16.4) | 62 (18.1) | 16 (18.8) | 2 (10.0) | |
X...Not.at.all.important.5 | 1 ( 0.6) | 0 ( 0.0) | 3 ( 0.9) | 0 ( 0.0) | 2 ( 0.5) | 1 ( 0.3) | 3 ( 0.9) | 1 ( 1.2) | 0 ( 0.0) | |
X...Slightly.important.5 | 1 ( 0.6) | 4 ( 3.3) | 5 ( 1.5) | 1 ( 0.9) | 8 ( 1.9) | 5 ( 1.3) | 6 ( 1.7) | 4 ( 4.7) | 1 ( 5.0) | |
footer-here | ||||||||||
# library(export)
#
religion_important: How important is religion or spirituality in your life?
religion_god: Do you believe in God or a universal spirit?
religion_mem: Are you a member of a church, synagogue or other place of worship?
var_religion <- df %>% select(starts_with("religion_"), -contains("_nolabel")) %>% names()
table.relig <- CreateTableOne(var_religion, data=df %>% filter(! race == "Other/Unknown" ))
table.relig <- print(table.relig, printToggle = F)
table.relig %>%
as.data.frame() %>%
rownames_to_column("Variables") %>%
filter(!Variables %in% c("n", " ")) %>%
select(Variables, `N (%)` = Overall) %>%
flextable::flextable() %>%
autofit(add_w = 0.3) %>%
align(align = "left") %>%
align(align = "left", part = "header") %>%
add_header_lines("Participant Characteristics, Baseline (N = 2934)") %>%
fontsize( size = 14, part = "header") %>%
fontsize( size = 12, part = "body")
Participant Characteristics, Baseline (N = 2934) | |
Variables | N (%) |
religion_import.... | |
X...Faily.Important | 703 (26.7) |
X...I.am.not.religious.or.spiritual | 237 ( 9.0) |
X...I.choose.not.to.answer | 193 ( 7.3) |
X...Not.Very.Important | 293 (11.1) |
X...Very.Important | 1204 (45.8) |
religion_god.... | |
X...I.choose.not.to.answer.1 | 124 ( 4.7) |
X...No | 137 ( 5.2) |
X...Not.sure | 167 ( 6.3) |
X...Yes | 2204 (83.7) |
religion_mem.... | |
X...I.choose.not.to.answer.2 | 195 ( 7.4) |
X...No.1 | 1141 (43.5) |
X...Yes.1 | 1288 (49.1) |
# by race
yujieR::pubtableone(df %>% filter(! race == "Other/Unknown" ),var_religion, var_religion, "race")
Table x: header-here | ||||||
Variables | Asian | Black | Hispanic | Other/Unknown | White | p |
n | 232 | 511 | 583 | 0 | 1358 | |
religion_import.... | - | NaN | ||||
X...Faily.Important | 59 (26.1) | 105 (21.4) | 150 (26.0) | - | 389 (29.1) | |
X...I.am.not.religious.or.spiritual | 15 ( 6.6) | 18 ( 3.7) | 41 ( 7.1) | - | 163 (12.2) | |
X...I.choose.not.to.answer | 18 ( 8.0) | 42 ( 8.6) | 53 ( 9.2) | - | 80 ( 6.0) | |
X...Not.Very.Important | 27 (11.9) | 22 ( 4.5) | 50 ( 8.7) | - | 194 (14.5) | |
X...Very.Important | 107 (47.3) | 304 (61.9) | 282 (49.0) | - | 511 (38.2) | |
religion_god.... | - | NaN | ||||
X...I.choose.not.to.answer.1 | 17 ( 7.6) | 22 ( 4.5) | 25 ( 4.3) | - | 60 ( 4.5) | |
X...No | 8 ( 3.6) | 4 ( 0.8) | 14 ( 2.4) | - | 111 ( 8.3) | |
X...Not.sure | 24 (10.7) | 11 ( 2.2) | 26 ( 4.5) | - | 106 ( 7.9) | |
X...Yes | 176 (78.2) | 457 (92.5) | 512 (88.7) | - | 1059 (79.3) | |
religion_mem.... | - | NaN | ||||
X...I.choose.not.to.answer.2 | 17 ( 7.5) | 40 ( 8.2) | 41 ( 7.1) | - | 97 ( 7.3) | |
X...No.1 | 89 (39.0) | 168 (34.4) | 289 (50.3) | - | 595 (44.6) | |
X...Yes.1 | 122 (53.5) | 281 (57.5) | 244 (42.5) | - | 641 (48.1) | |
footer-here | ||||||
table.religionByRace <- CreateTableOne(var_religion, strata = "race", data=df %>% filter(! race == "Other/Unknown" ))
table.religionByRace <- print(table.religionByRace, printToggle = F)
write.csv(table.religionByRace, "./Output/table religion by race ethnicity.csv")
# by who passed breeze or breeze like screening
yujieR::pubtableone(df,var_religion, var_religion, "early_ruleout")
Table x: header-here | |||
Variables | No | Yes | p |
n | 2661 | 273 | |
religion_import.... | 0.058 | ||
X...Faily.Important | 686 (26.3) | 74 (28.0) | |
X...I.am.not.religious.or.spiritual | 248 ( 9.5) | 15 ( 5.7) | |
X...I.choose.not.to.answer | 187 ( 7.2) | 19 ( 7.2) | |
X...Not.Very.Important | 298 (11.4) | 20 ( 7.6) | |
X...Very.Important | 1190 (45.6) | 136 (51.5) | |
religion_god.... | <0.001 | ||
X...I.choose.not.to.answer.1 | 127 ( 4.9) | 10 ( 3.8) | |
X...No | 146 ( 5.6) | 5 ( 1.9) | |
X...Not.sure | 177 ( 6.8) | 5 ( 1.9) | |
X...Yes | 2163 (82.8) | 245 (92.5) | |
religion_mem.... | 0.003 | ||
X...I.choose.not.to.answer.2 | 199 ( 7.6) | 14 ( 5.3) | |
X...No.1 | 1158 (44.5) | 95 (35.8) | |
X...Yes.1 | 1247 (47.9) | 156 (58.9) | |
footer-here | |||
table1_pre_religion <- CreateTableOne(var_religion, strata = "early_ruleout",factorVars = facvar,data = df )
table1_pre_religion <- print(table1_pre_religion, printToggle = F)
write.csv(table1_pre_religion, "./Output/table religion by pre breeze screen.csv")
# by relationship
yujieR::pubtableone(df,var_religion, var_religion, "recip_rel")
Table x: header-here | ||||||||||
Variables | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center | p |
n | 172 | 130 | 348 | 116 | 421 | 387 | 372 | 87 | 21 | |
religion_import.... | 0.003 | |||||||||
X...Faily.Important | 52 (31.7) | 40 (32.0) | 82 (23.8) | 27 (24.5) | 106 (25.6) | 117 (30.8) | 93 (25.9) | 20 (23.5) | 3 (14.3) | |
X...I.am.not.religious.or.spiritual | 10 ( 6.1) | 8 ( 6.4) | 22 ( 6.4) | 4 ( 3.6) | 34 ( 8.2) | 43 (11.3) | 17 ( 4.7) | 7 ( 8.2) | 3 (14.3) | |
X...I.choose.not.to.answer | 13 ( 7.9) | 11 ( 8.8) | 29 ( 8.4) | 10 ( 9.1) | 35 ( 8.5) | 38 (10.0) | 23 ( 6.4) | 8 ( 9.4) | 0 ( 0.0) | |
X...Not.Very.Important | 17 (10.4) | 13 (10.4) | 38 (11.0) | 7 ( 6.4) | 47 (11.4) | 52 (13.7) | 40 (11.1) | 5 ( 5.9) | 5 (23.8) | |
X...Very.Important | 72 (43.9) | 53 (42.4) | 173 (50.3) | 62 (56.4) | 192 (46.4) | 130 (34.2) | 186 (51.8) | 45 (52.9) | 10 (47.6) | |
religion_god.... | 0.208 | |||||||||
X...I.choose.not.to.answer.1 | 7 ( 4.2) | 8 ( 6.3) | 15 ( 4.4) | 4 ( 3.6) | 18 ( 4.4) | 25 ( 6.6) | 22 ( 6.1) | 3 ( 3.5) | 0 ( 0.0) | |
X...No | 5 ( 3.0) | 4 ( 3.1) | 8 ( 2.3) | 4 ( 3.6) | 14 ( 3.4) | 21 ( 5.5) | 10 ( 2.8) | 3 ( 3.5) | 1 ( 4.8) | |
X...Not.sure | 7 ( 4.2) | 7 ( 5.5) | 14 ( 4.1) | 2 ( 1.8) | 23 ( 5.6) | 26 ( 6.8) | 9 ( 2.5) | 4 ( 4.7) | 3 (14.3) | |
X...Yes | 148 (88.6) | 108 (85.0) | 307 (89.2) | 102 (91.1) | 355 (86.6) | 309 (81.1) | 320 (88.6) | 76 (88.4) | 17 (81.0) | |
religion_mem.... | 0.145 | |||||||||
X...I.choose.not.to.answer.2 | 17 (10.3) | 8 ( 6.3) | 24 ( 7.0) | 10 ( 9.3) | 36 ( 8.7) | 31 ( 8.1) | 32 ( 8.9) | 7 ( 8.3) | 0 ( 0.0) | |
X...No.1 | 67 (40.6) | 58 (45.7) | 143 (41.8) | 36 (33.3) | 177 (42.9) | 184 (48.3) | 132 (36.9) | 42 (50.0) | 12 (57.1) | |
X...Yes.1 | 81 (49.1) | 61 (48.0) | 175 (51.2) | 62 (57.4) | 200 (48.4) | 166 (43.6) | 194 (54.2) | 35 (41.7) | 9 (42.9) | |
footer-here | ||||||||||
So far only 12 potential donors claims to be “altruistic” donors.
df$pt_stat %>% tabyl() %>% adorn_pct_formatting() # for ucla variable
## . n percent valid_percent
## Altruistic 12 0.4% 2.7%
## Back-up Donor 47 1.6% 10.5%
## Declined participation 1 0.0% 0.2%
## Donated Kidney 93 3.2% 20.8%
## Inactive 43 1.5% 9.6%
## Ineligible 179 6.1% 40.0%
## Lost to Follow-Up 25 0.9% 5.6%
## Never enrolled 1 0.0% 0.2%
## Opt Out 17 0.6% 3.8%
## Overweight 17 0.6% 3.8%
## Paired-Exchange (non-UCLA) 4 0.1% 0.9%
## Paired-Exchange (UCLA) 4 0.1% 0.9%
## Reached Call Limit 4 0.1% 0.9%
## <NA> 2487 84.8% -
# df$recip_rel %>% tabyl() # for ucla variable
df$recip_first_know %>% tabyl() %>%
adorn_pct_formatting() %>%
arrange(-n) %>%
select(-valid_percent)
## . n percent
## 1 My recipient 1253 42.7%
## 2 <NA> 889 30.3%
## 3 Someone in my recipients family 316 10.8%
## 4 A medical professional 230 7.8%
## 5 No one, I found out myself 85 2.9%
## 6 Other 84 2.9%
## 7 Someone else who knew my recipient 77 2.6%
#by race
tabyl(df ,recip_first_know,race, show_na = FALSE) %>% adorn_crosstab("col")
## recip_first_know Asian Black Hispanic
## 1 A medical professional 19.8% (24) 9.1% (41) 16.9% (61)
## 2 My recipient 47.1% (57) 73.7% (331) 58.1% (209)
## 3 No one, I found out myself 9.1% (11) 3.3% (15) 4.7% (17)
## 4 Other 1.7% (2) 2.0% (9) 3.1% (11)
## 5 Someone else who knew my recipient 1.7% (2) 1.1% (5) 2.5% (9)
## 6 Someone in my recipients family 20.7% (25) 10.7% (48) 14.7% (53)
## Other/Unknown White
## 1 12.9% (20) 8.8% (84)
## 2 60.6% (94) 58.4% (559)
## 3 4.5% (7) 3.7% (35)
## 4 1.9% (3) 6.2% (59)
## 5 5.2% (8) 5.5% (53)
## 6 14.8% (23) 17.5% (167)
# get p value
# CrossTable(df$recip_first_how, df$race, chisq = T)
# by relationship
tabyl(df ,recip_first_know,recip_rel, show_na = FALSE) %>% adorn_crosstab("col")
## recip_first_know Another blood or biological relative
## 1 A medical professional 1.2% (2)
## 2 My recipient 55.0% (94)
## 3 No one, I found out myself 3.5% (6)
## 4 Other 1.8% (3)
## 5 Someone else who knew my recipient 1.8% (3)
## 6 Someone in my recipients family 36.8% (63)
## Another relative, not related biologically My brother or sister
## 1 0.8% (1) 5.5% (19)
## 2 49.2% (64) 73.5% (255)
## 3 2.3% (3) 2.6% (9)
## 4 4.6% (6) 2.9% (10)
## 5 5.4% (7) 0.0% (0)
## 6 37.7% (49) 15.6% (54)
## My child My friend or acquaintance My parent
## 1 46.0% (52) 0.7% (3) 10.2% (39)
## 2 44.2% (50) 56.0% (233) 74.0% (284)
## 3 2.7% (3) 4.6% (19) 4.2% (16)
## 4 2.7% (3) 5.3% (22) 1.6% (6)
## 5 0.0% (0) 13.2% (55) 0.5% (2)
## 6 4.4% (5) 20.2% (84) 9.6% (37)
## My spouse or life partner Other
## 1 30.4% (112) 1.2% (1)
## 2 62.2% (229) 40.5% (34)
## 3 4.6% (17) 7.1% (6)
## 4 1.4% (5) 22.6% (19)
## 5 0.3% (1) 9.5% (8)
## 6 1.1% (4) 19.0% (16)
## The next patient needing a kidney, chosen by the transplant center
## 1 0.0% (0)
## 2 0.0% (0)
## 3 33.3% (5)
## 4 53.3% (8)
## 5 6.7% (1)
## 6 6.7% (1)
# get p value
# CrossTable(df$recip_first_how, df$recip_rel, chisq = T)
Most donors(78%) heard about the need of a donor in either in-person conversations or telephone conversations, and this is consistent across racial/ethnicity groups. Only 6% heard about the need from social media platforms like facebook.
df$recip_first_how %>% tabyl() %>%
adorn_pct_formatting() %>%
arrange(-n) %>%
select(-valid_percent)
## . n percent
## 1 In an in-person conversation 1900 64.8%
## 2 In a telephone conversation 406 13.8%
## 3 Other 296 10.1%
## 4 Through a social media post (such as Facebook) 182 6.2%
## 5 In an email or letter 54 1.8%
## 6 I dont remember 49 1.7%
## 7 <NA> 47 1.6%
#by race
tabyl(df ,recip_first_how,race, show_na = FALSE) %>% adorn_crosstab("col")
## recip_first_how Asian Black
## 1 I dont remember 1.7% (4) 1.0% (5)
## 2 In a telephone conversation 10.9% (25) 16.9% (86)
## 3 In an email or letter 0.9% (2) 0.6% (3)
## 4 In an in-person conversation 70.7% (162) 71.5% (363)
## 5 Other 12.2% (28) 7.3% (37)
## 6 Through a social media post (such as Facebook) 3.5% (8) 2.8% (14)
## Hispanic Other/Unknown White
## 1 1.7% (10) 0.0% (0) 2.3% (30)
## 2 11.0% (63) 14.8% (27) 14.8% (197)
## 3 0.0% (0) 1.1% (2) 3.0% (40)
## 4 73.1% (419) 69.4% (127) 59.7% (796)
## 5 9.8% (56) 8.2% (15) 11.5% (153)
## 6 4.4% (25) 6.6% (12) 8.8% (117)
# get p value
# CrossTable(df$recip_first_how, df$race, chisq = T)
# by relationship
tabyl(df ,recip_first_how,recip_rel, show_na = FALSE) %>% adorn_crosstab("col")
## recip_first_how
## 1 I dont remember
## 2 In a telephone conversation
## 3 In an email or letter
## 4 In an in-person conversation
## 5 Other
## 6 Through a social media post (such as Facebook)
## Another blood or biological relative
## 1 1.2% (2)
## 2 29.8% (51)
## 3 1.8% (3)
## 4 59.1% (101)
## 5 4.7% (8)
## 6 3.5% (6)
## Another relative, not related biologically My brother or sister
## 1 0.0% (0) 1.7% (6)
## 2 16.3% (21) 26.1% (90)
## 3 1.6% (2) 1.4% (5)
## 4 72.1% (93) 64.6% (223)
## 5 4.7% (6) 5.5% (19)
## 6 5.4% (7) 0.6% (2)
## My child My friend or acquaintance My parent
## 1 0.9% (1) 1.9% (8) 2.6% (10)
## 2 8.9% (10) 15.1% (63) 10.1% (39)
## 3 0.0% (0) 4.3% (18) 0.3% (1)
## 4 76.8% (86) 58.4% (244) 80.5% (310)
## 5 13.4% (15) 5.5% (23) 6.5% (25)
## 6 0.0% (0) 14.8% (62) 0.0% (0)
## My spouse or life partner Other
## 1 1.6% (6) 0.0% (0)
## 2 3.6% (13) 11.6% (10)
## 3 0.0% (0) 2.3% (2)
## 4 79.4% (289) 43.0% (37)
## 5 15.4% (56) 22.1% (19)
## 6 0.0% (0) 20.9% (18)
## The next patient needing a kidney, chosen by the transplant center
## 1 5.6% (1)
## 2 5.6% (1)
## 3 0.0% (0)
## 4 5.6% (1)
## 5 66.7% (12)
## 6 16.7% (3)
# get p value
# CrossTable(df$recip_first_how, df$recip_rel, chisq = T)
If heard about the need of kidney via other ways -
df$recip_first_how_other %>% tabyl() %>%
adorn_pct_formatting() %>%
arrange(-n) %>%
select(-valid_percent) %>%
filter(! `.` %in% c(NA, "N/A")) %>% datatable()
df %>% tabyl(recip_first_how, recip_first_know) %>% adorn_crosstab() %>% flextable()
recip_first_how | A medical professional | My recipient | No one, I found out myself | Other | Someone else who knew my recipient | Someone in my recipients family | NA_ |
I dont remember | 4.1% (2) | 36.7% (18) | 10.2% (5) | 2.0% (1) | 2.0% (1) | 16.3% (8) | 28.6% (14) |
In a telephone conversation | 0.5% (2) | 48.8% (198) | 2.0% (8) | 2.5% (10) | 2.0% (8) | 17.5% (71) | 26.8% (109) |
In an email or letter | 0.0% (0) | 27.8% (15) | 1.9% (1) | 5.6% (3) | 13.0% (7) | 9.3% (5) | 42.6% (23) |
In an in-person conversation | 9.2% (174) | 49.5% (941) | 1.7% (32) | 1.1% (21) | 1.7% (33) | 9.6% (182) | 27.2% (517) |
Other | 17.2% (51) | 14.9% (44) | 8.1% (24) | 12.8% (38) | 2.7% (8) | 5.7% (17) | 38.5% (114) |
Through a social media post (such as Facebook) | 0.0% (0) | 12.6% (23) | 7.1% (13) | 5.5% (10) | 11.0% (20) | 17.0% (31) | 46.7% (85) |
2.1% (1) | 29.8% (14) | 4.3% (2) | 2.1% (1) | 0.0% (0) | 4.3% (2) | 57.4% (27) |
64% of potential donors claimed they needed no time and decided immediately to get tested. This number is 72% for Black and 70% for Hispanic donors, and 62% and 56% for White and Asian donors. When the recipient is a child, 81% of parants describe they needed no time and decided immediately to get tested.
df$recip_time %>% tabyl(show_na = F) %>% adorn_pct_formatting() %>% arrange(-n)
## . n percent
## 1 No time at all, I decided immediately 1814 64.1%
## 2 1 to 7 days 260 9.2%
## 3 More than 1 year 243 8.6%
## 4 2 to 6 months 218 7.7%
## 5 8 days to 1 month 188 6.6%
## 6 6 months to 1 year 106 3.7%
# by race
tabyl(df ,recip_time,race, show_na = FALSE) %>%
as.data.frame() %>%
adorn_crosstab("col") %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
recip_time | Asian | Black | Hispanic | Other/Unknown | White |
1 to 7 days | 11.4% (26) | 5.0% (25) | 6.3% (36) | 7.3% (13) | 11.6% (149) |
2 to 6 months | 10.1% (23) | 5.6% (28) | 8.3% (47) | 6.1% (11) | 8.1% (104) |
6 months to 1 year | 1.8% (4) | 3.6% (18) | 4.0% (23) | 2.2% (4) | 4.3% (55) |
8 days to 1 month | 8.8% (20) | 4.4% (22) | 6.9% (39) | 6.7% (12) | 6.8% (88) |
More than 1 year | 11.8% (27) | 9.9% (50) | 9.5% (54) | 8.4% (15) | 7.1% (92) |
No time at all, I decided immediately | 56.1% (128) | 71.6% (361) | 65.0% (370) | 69.3% (124) | 62.1% (800) |
# by relationship
tabyl(df ,recip_time,recip_rel, show_na = FALSE) %>%
adorn_crosstab("col") %>%
as.data.frame() %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
recip_time | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center |
1 to 7 days | 7.1% (12) | 12.3% (16) | 7.5% (25) | 2.6% (3) | 13.8% (56) | 3.4% (13) | 4.2% (15) | 13.9% (11) | 25.0% (3) |
2 to 6 months | 11.2% (19) | 8.5% (11) | 5.7% (19) | 5.2% (6) | 8.8% (36) | 7.4% (28) | 3.3% (12) | 6.3% (5) | 0.0% (0) |
6 months to 1 year | 4.1% (7) | 3.1% (4) | 4.2% (14) | 3.5% (4) | 4.2% (17) | 4.0% (15) | 2.5% (9) | 1.3% (1) | 8.3% (1) |
8 days to 1 month | 5.3% (9) | 7.7% (10) | 5.1% (17) | 4.3% (5) | 8.4% (34) | 7.1% (27) | 4.4% (16) | 3.8% (3) | 8.3% (1) |
More than 1 year | 6.5% (11) | 5.4% (7) | 6.6% (22) | 3.5% (4) | 7.4% (30) | 7.7% (29) | 10.5% (38) | 7.6% (6) | 25.0% (3) |
No time at all, I decided immediately | 65.7% (111) | 63.1% (82) | 70.9% (236) | 80.9% (93) | 57.5% (234) | 70.4% (267) | 75.1% (271) | 67.1% (53) | 33.3% (4) |
Potential donors’ communitities are often supportive in their decisions. 68% agree or strongly agrees that their communities is supportive in their decisions. Less Black donors (64%) say their communities are supportive. When the recipient is a child, 80% parents feel supported by their communities.
df$donor_comm %>% tabyl(show_na = F) %>% adorn_pct_formatting() %>% arrange(-n)
## . n percent
## 1 Strongly Agree 1098 39.1%
## 2 Neither Agree nor Disagree 853 30.4%
## 3 Agree 816 29.0%
## 4 Disagree 24 0.9%
## 5 Strongly Disagree 19 0.7%
# by race
tabyl(df ,donor_comm,race, show_na = FALSE) %>% adorn_crosstab("col") %>%
as.data.frame() %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
donor_comm | Asian | Black | Hispanic | Other/Unknown | White |
Agree | 31.7% (70) | 27.3% (129) | 30.7% (173) | 26.7% (47) | 28.5% (375) |
Disagree | 0.5% (1) | 0.4% (2) | 1.4% (8) | 1.7% (3) | 0.8% (10) |
Neither Agree nor Disagree | 28.1% (62) | 33.7% (159) | 26.8% (151) | 32.4% (57) | 31.0% (408) |
Strongly Agree | 39.4% (87) | 37.3% (176) | 40.5% (228) | 39.2% (69) | 39.0% (513) |
Strongly Disagree | 0.5% (1) | 1.3% (6) | 0.5% (3) | 0.0% (0) | 0.7% (9) |
# by relationship
tabyl(df ,donor_comm,recip_rel, show_na = FALSE) %>%
adorn_crosstab("col") %>%
as.data.frame() %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
donor_comm | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center |
Agree | 29.2% (47) | 23.4% (29) | 29.2% (99) | 23.3% (24) | 30.9% (125) | 24.9% (93) | 30.3% (105) | 24.7% (20) | 28.6% (6) |
Disagree | 1.2% (2) | 2.4% (3) | 0.6% (2) | 0.0% (0) | 1.0% (4) | 0.5% (2) | 0.0% (0) | 1.2% (1) | 4.8% (1) |
Neither Agree nor Disagree | 34.8% (56) | 37.9% (47) | 26.5% (90) | 20.4% (21) | 38.5% (156) | 30.2% (113) | 27.7% (96) | 43.2% (35) | 28.6% (6) |
Strongly Agree | 34.2% (55) | 35.5% (44) | 42.5% (144) | 56.3% (58) | 28.6% (116) | 43.9% (164) | 41.0% (142) | 29.6% (24) | 38.1% (8) |
Strongly Disagree | 0.6% (1) | 0.8% (1) | 1.2% (4) | 0.0% (0) | 1.0% (4) | 0.5% (2) | 0.9% (3) | 1.2% (1) | 0.0% (0) |
Only 13% of potential donors admitted there are someone important in their lives do not want them to donate. Asian donors facing the most resistance from their important ones (17%) followed by White (13%) and Hispanic (15%) and Black donors (8%). When the recipient is a child or spouse/life partner, the potential donors faces least resistance (4% and 8%, respectively).
df$donor_import %>% tabyl(show_na = F) %>% adorn_pct_formatting() %>% arrange(-n)
## . n percent
## 1 No 2291 87.3%
## 2 Yes 333 12.7%
# by race
tabyl(df ,donor_import,race, show_na = FALSE) %>% adorn_crosstab("col") %>%
as.data.frame() %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
donor_import | Asian | Black | Hispanic | Other/Unknown | White |
No | 83.3% (179) | 91.9% (418) | 85.9% (409) | 84.2% (133) | 87.4% (1101) |
Yes | 16.7% (36) | 8.1% (37) | 14.1% (67) | 15.8% (25) | 12.6% (159) |
# by relationship
tabyl(df ,donor_import,recip_rel, show_na = FALSE) %>% adorn_crosstab("col") %>%
as.data.frame() %>%
flextable::flextable() %>%
autofit(add_w = 0.2) %>%
align(align = "left") %>%
align(align = "left", part = "header")
donor_import | Another blood or biological relative | Another relative, not related biologically | My brother or sister | My child | My friend or acquaintance | My parent | My spouse or life partner | Other | The next patient needing a kidney, chosen by the transplant center |
No | 87.2% (129) | 88.7% (102) | 92.0% (277) | 96.2% (77) | 87.1% (331) | 90.3% (317) | 92.7% (294) | 86.1% (62) | 85.0% (17) |
Yes | 12.8% (19) | 11.3% (13) | 8.0% (24) | 3.8% (3) | 12.9% (49) | 9.7% (34) | 7.3% (23) | 13.9% (10) | 15.0% (3) |
varlist <- Cs(recip_first_how, recip_time, donor_comm,donor_import)
p.all <- do.call(rbind,
lapply(df[varlist], function(x) fisher.test(table(x,df$race), simulate.p.value = T)$p.value)
)
p.all
## [,1]
## recip_first_how 0.0004997501
## recip_time 0.0004997501
## donor_comm 0.4787606197
## donor_import 0.0054972514
# the p values look the same becauses of p-values computed by Monte Carlo simulation, in larger than 2by2 tables, the similar ones will be < 0.001 anyways.
varlist <- Cs(recip_first_how, recip_time, donor_comm,donor_import)
p.all2 <- do.call(rbind,
lapply(df[varlist], function(x) fisher.test(table(x,df$recip_rel), simulate.p.value = TRUE)$p.value)
)
p.all2
## [,1]
## recip_first_how 0.0004997501
## recip_time 0.0004997501
## donor_comm 0.0004997501
## donor_import 0.0494752624