competing risk hosp_outcome

master$cmp_status_hosp_outcome <- as.factor(master$cmp_status_hosp_outcome)
create_uvregression_table(
  data = master,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate hosp_outcome
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.34 0.21, 0.55 <0.001
age_bl 1,679 1.02 1.0, 1.04 0.120
Gender_Legal_Sex 1,679
    0
    1 1.38 0.87, 2.18 0.170
htn 1,679
    0
    1 1.55 0.68, 3.57 0.300
dm 1,679
    0
    1 1.10 0.70, 1.74 0.680
cad 1,679
    0
    1 1.75 1.08, 2.82 0.022
chf 1,679
    0
    1 1.45 0.72, 2.90 0.290
copd 1,679
    0
    1 1.57 0.92, 2.70 0.099
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.27 0.12, 0.61 0.002
    eGFR 45-59.9, no ESKD 0.15 0.07, 0.32 <0.001
    ESKD 0.31 0.11, 0.86 0.024
prior_doses 1,679
    3+ doses
    None 2.27 1.08, 4.75 0.030
    Primary series 2.10 1.29, 3.43 0.003
ddiff_vaccine 1,679
    <180 days
    >=180 days 2.22 1.40, 3.52 <0.001
subclass 1,679 1.00 1.00, 1.00 0.730
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate hosp_outcome
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.44 0.26, 0.73 0.002
age_bl 1,679 1.02 1.00, 1.05 0.031
Gender_Legal_Sex 1,679
    0
    1 1.28 0.80, 2.04 0.310
htn 1,679
    0
    1 1.14 0.49, 2.63 0.770
dm 1,679
    0
    1 0.85 0.52, 1.40 0.530
cad 1,679
    0
    1 1.62 0.95, 2.75 0.074
chf 1,679
    0
    1 0.86 0.40, 1.82 0.690
copd 1,679
    0
    1 1.08 0.59, 1.96 0.810
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.29 0.12, 0.69 0.005
    eGFR 45-59.9, no ESKD 0.18 0.08, 0.41 <0.001
    ESKD 0.34 0.12, 1.00 0.051
prior_doses 1,679
    3+ doses
    None 1.53 0.43, 5.47 0.510
    Primary series 1.38 0.48, 3.99 0.550
ddiff_vaccine 1,679
    <180 days
    >=180 days 1.56 0.56, 4.37 0.400
1 HR = Hazard Ratio, CI = Confidence Interval
# library(crrSC)
# 
# a <- crrc(ftime=covariate_matrix[,"cmp_time_hosp_outcome"],fstatus=covariate_matrix[,"cmp_status_hosp_outcome"],
# cov1=covariate_matrix[,"treated1"],
# cluster=covariate_matrix[,"subclass"])

new_cv

master$cmp_status_new_cv <- as.factor(master$cmp_status_new_cv)
create_uvregression_table(
  data = master,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate new_cv
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.45 0.33, 0.60 <0.001
age_bl 1,679 1.02 1.01, 1.04 0.002
Gender_Legal_Sex 1,679
    0
    1 1.14 0.85, 1.52 0.390
htn 1,679
    0
    1 1.61 0.94, 2.76 0.084
dm 1,679
    0
    1 1.57 1.17, 2.10 0.003
cad 1,679
    0
    1 2.47 1.79, 3.40 <0.001
chf 1,679
    0
    1 2.23 1.53, 3.24 <0.001
copd 1,679
    0
    1 1.50 1.06, 2.13 0.022
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.97 0.40, 2.31 0.940
    eGFR 45-59.9, no ESKD 0.60 0.25, 1.39 0.230
    ESKD 1.05 0.40, 2.74 0.920
prior_doses 1,679
    3+ doses
    None 1.90 1.19, 3.02 0.007
    Primary series 1.28 0.92, 1.78 0.140
ddiff_vaccine 1,679
    <180 days
    >=180 days 1.44 1.07, 1.93 0.015
subclass 1,679 1.00 1.00, 1.00 0.390
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate new_cv
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.49 0.36, 0.67 <0.001
age_bl 1,679 1.02 1.01, 1.04 0.004
Gender_Legal_Sex 1,679
    0
    1 1.04 0.77, 1.40 0.790
htn 1,679
    0
    1 0.88 0.48, 1.60 0.670
dm 1,679
    0
    1 1.25 0.91, 1.71 0.160
cad 1,679
    0
    1 2.05 1.42, 2.97 <0.001
chf 1,679
    0
    1 1.43 0.97, 2.10 0.071
copd 1,679
    0
    1 1.07 0.74, 1.54 0.730
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 1.12 0.44, 2.84 0.810
    eGFR 45-59.9, no ESKD 0.81 0.32, 2.02 0.650
    ESKD 1.15 0.42, 3.14 0.790
prior_doses 1,679
    3+ doses
    None 1.71 0.83, 3.51 0.150
    Primary series 1.06 0.60, 1.90 0.830
ddiff_vaccine 1,679
    <180 days
    >=180 days 1.11 0.64, 1.93 0.700
1 HR = Hazard Ratio, CI = Confidence Interval

renal_outcome removed ESKD

master_omicron <- master %>% filter(renal_group2!="ESKD")

master_omicron$cmp_status_renal_outcome <- as.factor(master_omicron$cmp_status_renal_outcome)
create_uvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_renal_outcome,
  outcome_status = cmp_status_renal_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate renal_outcome
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.55 0.31, 1.00 0.048
age_bl 1,578 1.00 0.97, 1.03 0.990
Gender_Legal_Sex 1,578
    0
    1 1.26 0.70, 2.26 0.440
htn 1,578
    0
    1 1.02 0.40, 2.58 0.970
dm 1,578
    0
    1 1.41 0.79, 2.53 0.250
cad 1,578
    0
    1 1.22 0.68, 2.20 0.500
chf 1,578
    0
    1 1.65 0.70, 3.90 0.250
copd 1,578
    0
    1 1.28 0.62, 2.65 0.510
renal_group2 1,578
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.30 0.13, 0.73 0.007
    eGFR 45-59.9, no ESKD 0.08 0.03, 0.20 <0.001
prior_doses 1,578
    3+ doses
    None 2.92 1.25, 6.82 0.013
    Primary series 1.63 0.85, 3.12 0.140
ddiff_vaccine 1,578
    <180 days
    >=180 days 1.53 0.85, 2.74 0.160
subclass 1,578 1.00 1.00, 1.00 0.510
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_renal_outcome,
  outcome_status = cmp_status_renal_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate renal_outcome
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.85 0.46, 1.56 0.590
age_bl 1,578 1.01 0.98, 1.04 0.570
Gender_Legal_Sex 1,578
    0
    1 1.19 0.66, 2.15 0.560
htn 1,578
    0
    1 0.94 0.28, 3.19 0.920
dm 1,578
    0
    1 1.19 0.61, 2.33 0.620
cad 1,578
    0
    1 1.21 0.61, 2.39 0.580
chf 1,578
    0
    1 1.11 0.44, 2.80 0.820
copd 1,578
    0
    1 0.91 0.37, 2.23 0.840
renal_group2 1,578
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.31 0.11, 0.93 0.037
    eGFR 45-59.9, no ESKD 0.09 0.03, 0.26 <0.001
prior_doses 1,578
    3+ doses
    None 5.04 1.12, 22.8 0.036
    Primary series 2.49 0.79, 7.83 0.120
ddiff_vaccine 1,578
    <180 days
    >=180 days 0.57 0.18, 1.81 0.340
1 HR = Hazard Ratio, CI = Confidence Interval

Univariate coxph death_outcome_long

master %>%
  select(treated,age_bl,Gender_Legal_Sex,htn,dm,cad,chf,copd,renal_group2,prior_doses,ddiff_vaccine,subclass,time_to_event_death_long,death_outcome_long) %>%
  tbl_uvregression(
    method = coxph,
    method.args = list(cluster = subclass),
    y = Surv(time_to_event_death_long,death_outcome_long),
    pvalue_fun = ~style_pvalue(.x, digits = 3),
    exponentiate = TRUE
  ) %>%
  bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
  bold_labels() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Univariate coxph model death_outcome_long" 
    ) 
Characteristic N ** Univariate coxph model death_outcome_long
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.34 0.20, 0.57 <0.001
age_bl 1,679 1.06 1.03, 1.10 <0.001
Gender_Legal_Sex 1,679
    0
    1 1.27 0.78, 2.09 0.339
htn 1,679
    0
    1 0.60 0.31, 1.15 0.121
dm 1,679
    0
    1 1.10 0.67, 1.81 0.700
cad 1,679
    0
    1 1.23 0.75, 2.01 0.422
chf 1,679
    0
    1 1.69 0.85, 3.40 0.137
copd 1,679
    0
    1 2.10 1.21, 3.65 0.009
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.62 0.21, 1.82 0.387
    eGFR 45-59.9, no ESKD 0.26 0.09, 0.73 0.011
    ESKD 0.36 0.09, 1.43 0.145
prior_doses 1,679
    3+ doses
    None 2.35 1.15, 4.79 0.019
    Primary series 1.18 0.67, 2.08 0.570
ddiff_vaccine 1,679
    <180 days
    >=180 days 1.33 0.81, 2.18 0.261
subclass 1,679 1.00 1.00, 1.00 0.308
1 HR = Hazard Ratio, CI = Confidence Interval

Multivariate coxph death_outcome_long

coxph(Surv(time_to_event_death_long,death_outcome_long) ~ treated+age_bl+Gender_Legal_Sex+htn+dm+cad+chf+copd+renal_group2+prior_doses+ddiff_vaccine+ cluster(subclass), data = master) %>% 
  tbl_regression(exponentiate = TRUE,
                 pvalue_fun = ~style_pvalue(.x, digits = 3)) %>% bold_p() %>% # bold p-values under a given threshold (default 0.05)
  bold_labels()%>%
  add_n() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Multivariate cox phmodel death_outcome_long" 
    ) 
Characteristic N ** Multivariate cox phmodel death_outcome_long
HR1 95% CI1 p-value
treated 1,679
    0
    1 0.37 0.21, 0.65 <0.001
age_bl 1,679 1.07 1.04, 1.11 <0.001
Gender_Legal_Sex 1,679
    0
    1 1.30 0.79, 2.16 0.304
htn 1,679
    0
    1 0.34 0.17, 0.67 0.002
dm 1,679
    0
    1 1.07 0.63, 1.81 0.806
cad 1,679
    0
    1 1.08 0.63, 1.86 0.774
chf 1,679
    0
    1 1.10 0.51, 2.35 0.806
copd 1,679
    0
    1 1.88 1.04, 3.41 0.036
renal_group2 1,679
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.79 0.27, 2.34 0.667
    eGFR 45-59.9, no ESKD 0.39 0.13, 1.19 0.098
    ESKD 0.56 0.13, 2.38 0.428
prior_doses 1,679
    3+ doses
    None 3.03 0.90, 10.2 0.074
    Primary series 1.43 0.52, 3.93 0.487
ddiff_vaccine 1,679
    <180 days
    >=180 days 0.79 0.29, 2.12 0.639
1 HR = Hazard Ratio, CI = Confidence Interval

Subgroup ESKD

master_ESKD <- master %>% filter(EKSD_status=="ESKD")


master_ESKD$cmp_status_hosp_outcome <- as.factor(master_ESKD$cmp_status_hosp_outcome)


create_uvregression_table(
  data = master_ESKD,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate hosp_outcome
HR1 95% CI1 p-value
treated 101
    0
    1 0.70 0.16, 3.07 0.640
age_bl 101 0.99 0.97, 1.02 0.530
Gender_Legal_Sex 101
    0
    1 1.10 0.25, 4.83 0.900
htn 101
    0
    1 0.34 0.07, 1.64 0.180
dm 101
    0
    1 0.74 0.17, 3.24 0.690
cad 101
    0
    1 0.63 0.14, 2.77 0.540
chf 101
    0
    1 1.87 0.37, 9.39 0.450
copd 101
    0
    1 1.63 0.32, 8.21 0.550
prior_doses 101
    3+ doses
    None 2.44 0.29, 20.8 0.410
    Primary series 1.21 0.22, 6.66 0.820
ddiff_vaccine 101
    <180 days
    >=180 days 3.04 0.60, 15.4 0.180
subclass 101 1.00 1.00, 1.00 0.920
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_ESKD,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate hosp_outcome
HR1 95% CI1 p-value
treated 101
    0
    1 0.35 0.04, 3.42 0.370
age_bl 101 1.01 0.96, 1.06 0.750
Gender_Legal_Sex 101
    0
    1 1.21 0.19, 7.58 0.840
htn 101
    0
    1 0.26 0.03, 1.99 0.200
dm 101
    0
    1 1.20 0.15, 9.55 0.860
cad 101
    0
    1 0.51 0.03, 8.38 0.640
chf 101
    0
    1 2.10 0.26, 17.3 0.490
copd 101
    0
    1 1.78 0.32, 10.1 0.510
prior_doses 101
    3+ doses
    None 0.51 0.04, 6.13 0.600
    Primary series 0.37 0.02, 6.70 0.500
ddiff_vaccine 101
    <180 days
    >=180 days 5.37 0.54, 53.8 0.150
1 HR = Hazard Ratio, CI = Confidence Interval
master_ESKD$cmp_status_new_cv <- as.factor(master_ESKD$cmp_status_new_cv)
create_uvregression_table(
  data = master_ESKD,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate new_cv
HR1 95% CI1 p-value
treated 101
    0
    1 0.64 0.24, 1.65 0.350
age_bl 101 1.05 1.01, 1.09 0.012
Gender_Legal_Sex 101
    0
    1 1.57 0.59, 4.19 0.370
htn 101
    0
    1 2.29 0.29, 17.9 0.430
dm 101
    0
    1 1.89 0.62, 5.79 0.260
cad 101
    0
    1 8.52 1.16, 62.7 0.035
chf 101
    0
    1 5.07 1.99, 13.0 <0.001
copd 101
    0
    1 1.67 0.61, 4.60 0.320
prior_doses 101
    3+ doses
    None 0.00 0.00, 0.00 <0.001
    Primary series 0.95 0.34, 2.66 0.920
ddiff_vaccine 101
    <180 days
    >=180 days 0.63 0.23, 1.69 0.360
subclass 101 1.00 1.00, 1.00 0.600
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_ESKD,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate new_cv
HR1 95% CI1 p-value
treated 101
    0
    1 1.12 0.38, 3.32 0.840
age_bl 101 1.03 0.99, 1.07 0.180
Gender_Legal_Sex 101
    0
    1 1.54 0.51, 4.68 0.440
htn 101
    0
    1 0.44 0.03, 7.48 0.570
dm 101
    0
    1 1.30 0.40, 4.18 0.660
cad 101
    0
    1 4.45 0.42, 46.9 0.210
chf 101
    0
    1 4.83 1.36, 17.2 0.015
copd 101
    0
    1 1.13 0.37, 3.44 0.830
prior_doses 101
    3+ doses
    None 0.00 0.00, 0.00 <0.001
    Primary series 1.73 0.40, 7.56 0.460
ddiff_vaccine 101
    <180 days
    >=180 days 0.46 0.09, 2.29 0.350
1 HR = Hazard Ratio, CI = Confidence Interval
master_ESKD %>%
  select(treated,age_bl,Gender_Legal_Sex,htn,dm,cad,chf,copd,prior_doses,ddiff_vaccine,subclass,time_to_event_death_long,death_outcome_long) %>%
  tbl_uvregression(
    method = coxph,
    method.args = list(cluster = subclass),
    y = Surv(time_to_event_death_long,death_outcome_long),
    pvalue_fun = ~style_pvalue(.x, digits = 3),
    exponentiate = TRUE
  ) %>%
  bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
  bold_labels() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Univariate coxph model death_outcome_long" 
    ) 
Characteristic N ** Univariate coxph model death_outcome_long
HR1 95% CI1 p-value
treated 101
    0
    1 0.31 0.03, 2.99 0.313
age_bl 101 1.13 1.06, 1.21 <0.001
Gender_Legal_Sex 101
    0
    1 2.47 0.26, 23.9 0.435
htn 101
    0
    1 81,026,706 26,507,346, 247,679,532 <0.001
dm 101
    0
    1 378,721,809 135,307,010, 1,060,035,312 <0.001
cad 101
    0
    1 1.47 0.16, 13.4 0.734
chf 101
    0
    1 1.58 0.17, 14.7 0.687
copd 101
    0
    1 12.8 1.39, 118 0.024
prior_doses 101
    3+ doses
    None 0.00 0.00, 0.00 <0.001
    Primary series 0.77 0.08, 7.27 0.823
ddiff_vaccine 101
    <180 days
    >=180 days 0.40 0.04, 3.73 0.419
subclass 101 1.00 1.00, 1.00 0.308
1 HR = Hazard Ratio, CI = Confidence Interval
coxph(Surv(time_to_event_death_long,death_outcome_long) ~ treated+age_bl+Gender_Legal_Sex+htn+dm+cad+chf+copd+prior_doses+ddiff_vaccine+ cluster(subclass), data = master_ESKD) %>% 
  tbl_regression(exponentiate = TRUE,
                 pvalue_fun = ~style_pvalue(.x, digits = 3)) %>% bold_p() %>% # bold p-values under a given threshold (default 0.05)
  bold_labels()%>%
  add_n() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Multivariate cox phmodel death_outcome_long" 
    ) 
Characteristic N ** Multivariate cox phmodel death_outcome_long
HR1 95% CI1 p-value
treated 101
    0
    1 0.65 0.14, 3.14 0.596
age_bl 101 1.15 1.04, 1.27 0.007
Gender_Legal_Sex 101
    0
    1 2.31 0.20, 26.5 0.501
htn 101
    0
    1 28,637,769 4,105,375, 199,767,835 <0.001
dm 101
    0
    1 362,026,699 83,768,314, 1,564,593,158 <0.001
cad 101
    0
    1 0.00 0.00, 0.00 <0.001
chf 101
    0
    1 87,026,179 18,332,736, 413,116,516 <0.001
copd 101
    0
    1 728,675,396 140,545,834, 3,777,898,060 <0.001
prior_doses 101
    3+ doses
    None 0.26 0.04, 1.78 0.171
    Primary series 0.67 0.12, 3.72 0.643
ddiff_vaccine 101
    <180 days
    >=180 days 0.00 0.00, 0.00 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval

Subgroup NON ESKD

master_non_ESKD <- master %>% filter(EKSD_status=="non-ESKD")


master_non_ESKD$cmp_status_hosp_outcome <- as.factor(master_non_ESKD$cmp_status_hosp_outcome)
create_uvregression_table(
  data = master_non_ESKD,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate hosp_outcome
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.32 0.20, 0.53 <0.001
age_bl 1,578 1.03 1.00, 1.06 0.047
Gender_Legal_Sex 1,578
    0
    1 1.39 0.86, 2.25 0.180
htn 1,578
    0
    1 2.16 0.79, 5.92 0.130
dm 1,578
    0
    1 1.12 0.69, 1.81 0.650
cad 1,578
    0
    1 1.89 1.14, 3.14 0.013
chf 1,578
    0
    1 1.32 0.61, 2.88 0.480
copd 1,578
    0
    1 1.55 0.88, 2.75 0.130
prior_doses 1,578
    3+ doses
    None 2.26 1.03, 4.95 0.041
    Primary series 2.22 1.33, 3.71 0.002
ddiff_vaccine 1,578
    <180 days
    >=180 days 2.13 1.31, 3.45 0.002
subclass 1,578 1.00 1.00, 1.00 0.680
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_non_ESKD,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate hosp_outcome
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.37 0.22, 0.62 <0.001
age_bl 1,578 1.03 1.00, 1.06 0.021
Gender_Legal_Sex 1,578
    0
    1 1.30 0.80, 2.13 0.290
htn 1,578
    0
    1 1.45 0.53, 3.95 0.460
dm 1,578
    0
    1 0.95 0.57, 1.59 0.850
cad 1,578
    0
    1 1.60 0.91, 2.81 0.100
chf 1,578
    0
    1 0.86 0.37, 2.00 0.730
copd 1,578
    0
    1 1.20 0.64, 2.24 0.570
prior_doses 1,578
    3+ doses
    None 1.74 0.40, 7.51 0.460
    Primary series 1.59 0.46, 5.57 0.470
ddiff_vaccine 1,578
    <180 days
    >=180 days 1.23 0.35, 4.33 0.750
1 HR = Hazard Ratio, CI = Confidence Interval
master_non_ESKD$cmp_status_new_cv <- as.factor(master_non_ESKD$cmp_status_new_cv)
create_uvregression_table(
  data = master_non_ESKD,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate new_cv
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.44 0.32, 0.60 <0.001
age_bl 1,578 1.02 1.01, 1.04 0.011
Gender_Legal_Sex 1,578
    0
    1 1.09 0.80, 1.48 0.590
htn 1,578
    0
    1 1.56 0.89, 2.72 0.120
dm 1,578
    0
    1 1.52 1.12, 2.06 0.008
cad 1,578
    0
    1 2.29 1.65, 3.19 <0.001
chf 1,578
    0
    1 1.87 1.22, 2.85 0.004
copd 1,578
    0
    1 1.47 1.01, 2.13 0.042
prior_doses 1,578
    3+ doses
    None 2.17 1.36, 3.48 0.001
    Primary series 1.32 0.94, 1.87 0.110
ddiff_vaccine 1,578
    <180 days
    >=180 days 1.55 1.14, 2.10 0.005
subclass 1,578 1.00 1.00, 1.00 0.470
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_non_ESKD,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate new_cv
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.47 0.34, 0.65 <0.001
age_bl 1,578 1.02 1.00, 1.04 0.013
Gender_Legal_Sex 1,578
    0
    1 1.01 0.74, 1.38 0.940
htn 1,578
    0
    1 0.91 0.50, 1.67 0.770
dm 1,578
    0
    1 1.29 0.93, 1.79 0.120
cad 1,578
    0
    1 2.01 1.38, 2.93 <0.001
chf 1,578
    0
    1 1.24 0.82, 1.89 0.310
copd 1,578
    0
    1 1.12 0.76, 1.65 0.570
prior_doses 1,578
    3+ doses
    None 1.79 0.84, 3.81 0.130
    Primary series 1.03 0.56, 1.90 0.920
ddiff_vaccine 1,578
    <180 days
    >=180 days 1.15 0.64, 2.07 0.630
1 HR = Hazard Ratio, CI = Confidence Interval
master_non_ESKD %>%
  select(treated,age_bl,Gender_Legal_Sex,htn,dm,cad,chf,copd,prior_doses,ddiff_vaccine,subclass,time_to_event_death_long,death_outcome_long) %>%
  tbl_uvregression(
    method = coxph,
    method.args = list(cluster = subclass),
    y = Surv(time_to_event_death_long,death_outcome_long),
    pvalue_fun = ~style_pvalue(.x, digits = 3),
    exponentiate = TRUE
  ) %>%
  bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
  bold_labels() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Univariate coxph model death_outcome_long" 
    ) 
Characteristic N ** Univariate coxph model death_outcome_long
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.34 0.20, 0.58 <0.001
age_bl 1,578 1.06 1.02, 1.10 0.003
Gender_Legal_Sex 1,578
    0
    1 1.22 0.73, 2.04 0.439
htn 1,578
    0
    1 0.55 0.28, 1.05 0.070
dm 1,578
    0
    1 1.00 0.60, 1.68 0.991
cad 1,578
    0
    1 1.22 0.73, 2.03 0.456
chf 1,578
    0
    1 1.71 0.82, 3.57 0.152
copd 1,578
    0
    1 1.81 1.00, 3.28 0.048
prior_doses 1,578
    3+ doses
    None 2.57 1.26, 5.27 0.010
    Primary series 1.21 0.67, 2.19 0.517
ddiff_vaccine 1,578
    <180 days
    >=180 days 1.44 0.86, 2.39 0.162
subclass 1,578 1.00 1.00, 1.00 0.250
1 HR = Hazard Ratio, CI = Confidence Interval
coxph(Surv(time_to_event_death_long,death_outcome_long) ~ treated+age_bl+Gender_Legal_Sex+htn+dm+cad+chf+copd+prior_doses+ddiff_vaccine+ cluster(subclass), data = master_non_ESKD) %>% 
  tbl_regression(exponentiate = TRUE,
                 pvalue_fun = ~style_pvalue(.x, digits = 3)) %>% bold_p() %>% # bold p-values under a given threshold (default 0.05)
  bold_labels()%>%
  add_n() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Multivariate cox phmodel death_outcome_long" 
    ) 
Characteristic N ** Multivariate cox phmodel death_outcome_long
HR1 95% CI1 p-value
treated 1,578
    0
    1 0.34 0.19, 0.61 <0.001
age_bl 1,578 1.07 1.03, 1.11 <0.001
Gender_Legal_Sex 1,578
    0
    1 1.25 0.75, 2.10 0.393
htn 1,578
    0
    1 0.33 0.17, 0.66 0.002
dm 1,578
    0
    1 1.04 0.60, 1.80 0.887
cad 1,578
    0
    1 1.11 0.65, 1.89 0.701
chf 1,578
    0
    1 1.26 0.57, 2.80 0.567
copd 1,578
    0
    1 1.70 0.91, 3.19 0.099
prior_doses 1,578
    3+ doses
    None 3.02 0.92, 9.88 0.068
    Primary series 1.33 0.50, 3.53 0.573
ddiff_vaccine 1,578
    <180 days
    >=180 days 0.83 0.32, 2.17 0.709
1 HR = Hazard Ratio, CI = Confidence Interval

Subgroup omicron

master_omicron <- master %>% filter(wave=="omicron")


master_omicron$cmp_status_hosp_outcome <- as.factor(master_omicron$cmp_status_hosp_outcome)
create_uvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate hosp_outcome
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.34 0.19, 0.61 <0.001
age_bl 1,207 1.02 0.99, 1.05 0.230
Gender_Legal_Sex 1,207
    0
    1 1.67 0.94, 2.96 0.080
htn 1,207
    0
    1 2.07 0.65, 6.65 0.220
dm 1,207
    0
    1 1.54 0.87, 2.73 0.140
cad 1,207
    0
    1 1.81 1.00, 3.27 0.049
chf 1,207
    0
    1 1.22 0.49, 3.06 0.670
copd 1,207
    0
    1 2.07 1.12, 3.85 0.021
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.32 0.11, 0.96 0.043
    eGFR 45-59.9, no ESKD 0.18 0.06, 0.51 0.001
    ESKD 0.21 0.05, 0.94 0.041
prior_doses 1,207
    3+ doses
    None 1.48 0.44, 4.95 0.520
    Primary series 2.54 1.40, 4.60 0.002
ddiff_vaccine 1,207
    <180 days
    >=180 days 2.06 1.17, 3.63 0.013
subclass 1,207 1.00 1.00, 1.00 0.830
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_hosp_outcome,
  outcome_status = cmp_status_hosp_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate hosp_outcome
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.41 0.22, 0.77 0.006
age_bl 1,207 1.02 1.00, 1.05 0.096
Gender_Legal_Sex 1,207
    0
    1 1.65 0.93, 2.91 0.088
htn 1,207
    0
    1 1.13 0.34, 3.76 0.850
dm 1,207
    0
    1 1.20 0.65, 2.20 0.560
cad 1,207
    0
    1 1.47 0.75, 2.87 0.260
chf 1,207
    0
    1 0.73 0.27, 1.92 0.520
copd 1,207
    0
    1 1.42 0.76, 2.68 0.280
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.40 0.14, 1.13 0.083
    eGFR 45-59.9, no ESKD 0.28 0.10, 0.79 0.016
    ESKD 0.24 0.05, 1.14 0.073
prior_doses 1,207
    3+ doses
    None 1.10 0.14, 8.35 0.930
    Primary series 1.93 0.36, 10.2 0.440
ddiff_vaccine 1,207
    <180 days
    >=180 days 1.24 0.24, 6.43 0.800
1 HR = Hazard Ratio, CI = Confidence Interval
master_omicron_renal <- master_omicron %>% filter(renal_group2!="ESKD")

master_omicron_renal$cmp_status_renal_outcome <- as.factor(master_omicron_renal$cmp_status_renal_outcome)
create_uvregression_table(
  data = master_omicron_renal,
  outcome_time = cmp_time_renal_outcome,
  outcome_status = cmp_status_renal_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate renal_outcome
HR1 95% CI1 p-value
treated 1,130
    0
    1 0.76 0.37, 1.57 0.460
age_bl 1,130 0.99 0.96, 1.02 0.620
Gender_Legal_Sex 1,130
    0
    1 1.87 0.91, 3.86 0.089
htn 1,130
    0
    1 1.92 0.46, 8.08 0.380
dm 1,130
    0
    1 2.26 1.08, 4.70 0.030
cad 1,130
    0
    1 0.94 0.47, 1.90 0.870
chf 1,130
    0
    1 1.22 0.37, 4.02 0.740
copd 1,130
    0
    1 1.23 0.51, 3.01 0.650
renal_group2 1,130
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.59 0.18, 1.91 0.370
    eGFR 45-59.9, no ESKD 0.09 0.03, 0.32 <0.001
prior_doses 1,130
    3+ doses
    None 3.01 1.03, 8.81 0.044
    Primary series 1.34 0.57, 3.16 0.500
ddiff_vaccine 1,130
    <180 days
    >=180 days 1.41 0.68, 2.95 0.360
subclass 1,130 1.00 1.00, 1.00 0.410
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_omicron_renal,
  outcome_time = cmp_time_renal_outcome,
  outcome_status = cmp_status_renal_outcome,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate renal_outcome
HR1 95% CI1 p-value
treated 1,130
    0
    1 1.13 0.52, 2.46 0.750
age_bl 1,130 1.00 0.97, 1.03 0.890
Gender_Legal_Sex 1,130
    0
    1 1.75 0.81, 3.79 0.150
htn 1,130
    0
    1 1.51 0.24, 9.62 0.670
dm 1,130
    0
    1 1.85 0.80, 4.28 0.150
cad 1,130
    0
    1 0.76 0.37, 1.58 0.460
chf 1,130
    0
    1 1.10 0.33, 3.69 0.880
copd 1,130
    0
    1 1.02 0.39, 2.66 0.970
renal_group2 1,130
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.68 0.16, 2.94 0.600
    eGFR 45-59.9, no ESKD 0.10 0.02, 0.46 0.003
prior_doses 1,130
    3+ doses
    None 5.77 0.61, 54.9 0.130
    Primary series 1.98 0.33, 11.7 0.450
ddiff_vaccine 1,130
    <180 days
    >=180 days 0.53 0.09, 3.12 0.480
1 HR = Hazard Ratio, CI = Confidence Interval
master_omicron$cmp_status_new_cv <- as.factor(master_omicron$cmp_status_new_cv)
create_uvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray model Univariate new_cv
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.37 0.26, 0.52 <0.001
age_bl 1,207 1.01 0.99, 1.02 0.340
Gender_Legal_Sex 1,207
    0
    1 1.11 0.79, 1.56 0.560
htn 1,207
    0
    1 1.68 0.89, 3.18 0.110
dm 1,207
    0
    1 1.74 1.23, 2.46 0.002
cad 1,207
    0
    1 2.01 1.40, 2.89 <0.001
chf 1,207
    0
    1 1.91 1.19, 3.07 0.007
copd 1,207
    0
    1 1.79 1.21, 2.64 0.004
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.89 0.31, 2.58 0.830
    eGFR 45-59.9, no ESKD 0.54 0.19, 1.53 0.250
    ESKD 0.87 0.27, 2.81 0.820
prior_doses 1,207
    3+ doses
    None 2.11 1.20, 3.74 0.010
    Primary series 1.23 0.81, 1.88 0.330
ddiff_vaccine 1,207
    <180 days
    >=180 days 1.38 0.96, 1.97 0.078
subclass 1,207 1.00 1.00, 1.00 0.850
1 HR = Hazard Ratio, CI = Confidence Interval
create_mvregression_table(
  data = master_omicron,
  outcome_time = cmp_time_new_cv,
  outcome_status = cmp_status_new_cv,
  covariates = c("treated","age_bl","Gender_Legal_Sex","htn","dm","cad","chf","copd","renal_group2","prior_doses","ddiff_vaccine")
)
Characteristic N Fine & Gray Model Multivariate new_cv
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.41 0.28, 0.59 <0.001
age_bl 1,207 1.01 0.99, 1.02 0.460
Gender_Legal_Sex 1,207
    0
    1 1.07 0.75, 1.51 0.720
htn 1,207
    0
    1 1.10 0.54, 2.23 0.800
dm 1,207
    0
    1 1.34 0.92, 1.96 0.130
cad 1,207
    0
    1 1.58 1.04, 2.40 0.032
chf 1,207
    0
    1 1.31 0.81, 2.13 0.270
copd 1,207
    0
    1 1.34 0.89, 2.04 0.160
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 1.08 0.36, 3.25 0.890
    eGFR 45-59.9, no ESKD 0.81 0.27, 2.39 0.700
    ESKD 0.86 0.26, 2.86 0.800
prior_doses 1,207
    3+ doses
    None 1.56 0.59, 4.12 0.370
    Primary series 0.92 0.40, 2.12 0.850
ddiff_vaccine 1,207
    <180 days
    >=180 days 1.11 0.51, 2.43 0.790
1 HR = Hazard Ratio, CI = Confidence Interval
master_omicron %>%
  select(treated,age_bl,Gender_Legal_Sex,htn,dm,cad,chf,copd,renal_group2,prior_doses,ddiff_vaccine,subclass,time_to_event_death_long,death_outcome_long) %>%
  tbl_uvregression(
    method = coxph,
    method.args = list(cluster = subclass),
    y = Surv(time_to_event_death_long,death_outcome_long),
    pvalue_fun = ~style_pvalue(.x, digits = 3),
    exponentiate = TRUE
  ) %>%
  bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
  bold_labels() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Univariate coxph model death_outcome_long" 
    ) 
Characteristic N ** Univariate coxph model death_outcome_long
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.30 0.16, 0.57 <0.001
age_bl 1,207 1.05 1.00, 1.10 0.034
Gender_Legal_Sex 1,207
    0
    1 1.42 0.78, 2.60 0.248
htn 1,207
    0
    1 0.56 0.26, 1.20 0.134
dm 1,207
    0
    1 1.29 0.71, 2.35 0.404
cad 1,207
    0
    1 1.18 0.65, 2.14 0.592
chf 1,207
    0
    1 2.46 1.15, 5.25 0.020
copd 1,207
    0
    1 1.77 0.89, 3.53 0.106
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.43 0.12, 1.53 0.194
    eGFR 45-59.9, no ESKD 0.20 0.06, 0.69 0.011
    ESKD 0.29 0.06, 1.45 0.130
prior_doses 1,207
    3+ doses
    None 2.38 0.96, 5.90 0.061
    Primary series 0.86 0.38, 1.94 0.721
ddiff_vaccine 1,207
    <180 days
    >=180 days 1.35 0.73, 2.51 0.342
subclass 1,207 1.00 1.00, 1.00 0.116
1 HR = Hazard Ratio, CI = Confidence Interval
coxph(Surv(time_to_event_death_long,death_outcome_long) ~ treated+age_bl+Gender_Legal_Sex+htn+dm+cad+chf+copd+renal_group2+prior_doses+ddiff_vaccine+ cluster(subclass), data = master_omicron) %>% 
  tbl_regression(exponentiate = TRUE,
                 pvalue_fun = ~style_pvalue(.x, digits = 3)) %>% bold_p() %>% # bold p-values under a given threshold (default 0.05)
  bold_labels()%>%
  add_n() %>%
    modify_spanning_header(
      c(estimate, ci, p.value) ~ "** Multivariate cox phmodel death_outcome_long" 
    ) 
Characteristic N ** Multivariate cox phmodel death_outcome_long
HR1 95% CI1 p-value
treated 1,207
    0
    1 0.32 0.15, 0.66 0.002
age_bl 1,207 1.05 1.01, 1.10 0.014
Gender_Legal_Sex 1,207
    0
    1 1.46 0.81, 2.64 0.213
htn 1,207
    0
    1 0.31 0.14, 0.68 0.003
dm 1,207
    0
    1 1.15 0.61, 2.16 0.673
cad 1,207
    0
    1 1.00 0.53, 1.89 0.995
chf 1,207
    0
    1 2.05 0.88, 4.77 0.095
copd 1,207
    0
    1 1.37 0.66, 2.82 0.396
renal_group2 1,207
    eGFR <30, no ESKD
    eGFR 30-44.9, no ESKD 0.52 0.14, 1.93 0.326
    eGFR 45-59.9, no ESKD 0.31 0.08, 1.21 0.091
    ESKD 0.37 0.06, 2.18 0.269
prior_doses 1,207
    3+ doses
    None 1.51 0.41, 5.65 0.538
    Primary series 0.57 0.18, 1.86 0.355
ddiff_vaccine 1,207
    <180 days
    >=180 days 1.61 0.61, 4.24 0.338
1 HR = Hazard Ratio, CI = Confidence Interval