FRI

Author

MT Kingery

Clavicle:

Forearm:

Wrist:

Humerus:

Match balance:

df.m <- read.xlsx("/Users/mtk/Dropbox/Research/Projects/FRI/FRI/fri_matched-cohort_final.xlsx")

df.m <- df.m %>%
  mutate(fri = case_when(
    fri == '0' ~ 'no_fri',
    fri == '1' ~ 'yes_fri'
  ))

df.m <- df.m %>%
  mutate(
    across(c(mrn,
             fri,
             gender,
             asa,
             group),
           factor)
  )

df.m %>%
  group_by(fri) %>%
  summarise(
    across(c(age, bmi),
           list(mean = mean, sd = sd), 
           na.rm = TRUE,
           .names = "{col}_{fn}"))
# A tibble: 2 × 5
  fri     age_mean age_sd bmi_mean bmi_sd
  <fct>      <dbl>  <dbl>    <dbl>  <dbl>
1 no_fri      49.4   19.7     25.7   4.90
2 yes_fri     48.6   19.2     25.3   4.42
t.test(age ~ fri,
       data = df.m)

    Welch Two Sample t-test

data:  age by fri
t = 0.23017, df = 73.672, p-value = 0.8186
alternative hypothesis: true difference in means between group no_fri and group yes_fri is not equal to 0
95 percent confidence interval:
 -5.995311  7.561203
sample estimates:
 mean in group no_fri mean in group yes_fri 
             49.36434              48.58140 
t.test(bmi ~ fri,
       data = df.m)

    Welch Two Sample t-test

data:  bmi by fri
t = 0.47457, df = 79.12, p-value = 0.6364
alternative hypothesis: true difference in means between group no_fri and group yes_fri is not equal to 0
95 percent confidence interval:
 -1.213262  1.972952
sample estimates:
 mean in group no_fri mean in group yes_fri 
             25.65891              25.27907 
tab <- table(df.m$gender, df.m$fri)
round(prop.table(tab, margin = 2)*100,1)
   
    no_fri yes_fri
  0   45.7    41.9
  1   54.3    58.1
tab2 <- table(df.m$asa, df.m$fri)
round(prop.table(tab2, margin = 2)*100,1)
   
    no_fri yes_fri
  1   17.1    23.3
  2   54.3    51.2
  3   19.4    16.3
  4    9.3     7.0
  5    0.0     2.3
fisher.test(tab)

    Fisher's Exact Test for Count Data

data:  tab
p-value = 0.7248
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.551754 2.515470
sample estimates:
odds ratio 
  1.169566 
fisher.test(tab2)

    Fisher's Exact Test for Count Data

data:  tab2
p-value = 0.477
alternative hypothesis: two.sided