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

“cmp_time_renal_outcome”,“cmp_status_renal_outcome”

renal_outcome removed ESKD

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

master_renal$cmp_status_renal_outcome <- as.factor(master_renal$cmp_status_renal_outcome)
create_uvregression_table(
  data = master_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,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_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,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