Geri tab match

Author

MT Kingery

Match:

Match balance:

df.m <- df.match1 %>% 
  select(-dob)

df.m <- df.m %>%
  mutate(group = case_when(
    group == '0' ~ 'oa',
    group == '1' ~ 'tab'
  ))

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

df.m %>%
  group_by(group) %>%
  summarise(
    across(c(age, bmi, cci),
           list(mean = mean, sd = sd), 
           na.rm = TRUE,
           .names = "{col}_{fn}"))
# A tibble: 2 × 7
  group age_mean age_sd bmi_mean bmi_sd cci_mean cci_sd
  <fct>    <dbl>  <dbl>    <dbl>  <dbl>    <dbl>  <dbl>
1 oa        70.4  10.2      27.5   4.98    0.489  0.815
2 tab       70.7   8.22     26.9   5.73    0.733  1.22 
t.test(age ~ group,
       data = df.m)

    Welch Two Sample t-test

data:  age by group
t = -0.11908, df = 29.673, p-value = 0.906
alternative hypothesis: true difference in means between group oa and group tab is not equal to 0
95 percent confidence interval:
 -5.649338  5.027115
sample estimates:
 mean in group oa mean in group tab 
         70.35556          70.66667 
t.test(bmi ~ group,
       data = df.m)

    Welch Two Sample t-test

data:  bmi by group
t = 0.34871, df = 21.516, p-value = 0.7307
alternative hypothesis: true difference in means between group oa and group tab is not equal to 0
95 percent confidence interval:
 -2.858484  4.012262
sample estimates:
 mean in group oa mean in group tab 
         27.52022          26.94333 
t.test(cci ~ group,
       data = df.m)

    Welch Two Sample t-test

data:  cci by group
t = -0.72255, df = 18.328, p-value = 0.4791
alternative hypothesis: true difference in means between group oa and group tab is not equal to 0
95 percent confidence interval:
 -0.9542928  0.4654039
sample estimates:
 mean in group oa mean in group tab 
        0.4888889         0.7333333 
t1 <- table(df.m$sex, df.m$group)
round(prop.table(t1, margin = 2)*100,1)
   
      oa  tab
  0 51.1 46.7
  1 48.9 53.3
t2 <- table(df.m$asa, df.m$group)
round(prop.table(t2, margin = 2)*100,1)
   
      oa  tab
  1 15.6  6.7
  2 26.7 26.7
  3 42.2 53.3
  4 15.6 13.3
fisher.test(t1)

    Fisher's Exact Test for Count Data

data:  t1
p-value = 1
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.3159736 4.5902137
sample estimates:
odds ratio 
  1.191262 
fisher.test(t2)

    Fisher's Exact Test for Count Data

data:  t2
p-value = 0.8755
alternative hypothesis: two.sided

All variables are appropriately balanced.