Matching

Unviariate Logistic regression cohort 913 hosp_outcome_30days_status

Characteristic N OR1 95% CI1 p-value
year_10 913 1.18 1.0, 1.42 0.064
Gender_Legal_Sex 913


    Female
— —
    Male
1.01 0.65, 1.58 0.953
vaccine_ACTUAL 913


    0
— —
    1
0.66 0.40, 1.12 0.112
htn 913


    0
— —
    1
1.40 0.78, 2.70 0.283
dm 913


    0
— —
    1
1.34 0.86, 2.10 0.192
cad 913


    0
— —
    1
1.39 0.89, 2.19 0.144
copd 913


    0
— —
    1
1.51 0.86, 2.55 0.136
renal_group2 913


    eGFR 45-59.9, no ESKD
— —
    ESKD
1.64 0.80, 3.14 0.155
    eGFR 30-44.9, no ESKD
1.34 0.77, 2.28 0.287
    eGFR <30, no ESKD
1.88 0.86, 3.80 0.094
immunosuppressant 913


    0
— —
    1
2.16 0.91, 4.58 0.059
1 OR = Odds Ratio, CI = Confidence Interval

Multvariate logistic regression hosp_outcome_30days_status

Characteristic N OR1 95% CI1 p-value
year_10 913 1.20 1.0, 1.45 0.063
Gender_Legal_Sex 913


    Female
— —
    Male
0.94 0.60, 1.49 0.806
vaccine_ACTUAL 913


    0
— —
    1
0.53 0.31, 0.93 0.023
htn 913


    0
— —
    1
1.23 0.62, 2.57 0.570
dm 913


    0
— —
    1
1.16 0.72, 1.89 0.538
cad 913


    0
— —
    1
1.19 0.72, 1.98 0.491
copd 913


    0
— —
    1
1.36 0.75, 2.37 0.287
renal_group2 913


    eGFR 45-59.9, no ESKD
— —
    ESKD
1.68 0.79, 3.36 0.157
    eGFR 30-44.9, no ESKD
1.19 0.67, 2.05 0.541
    eGFR <30, no ESKD
1.69 0.76, 3.47 0.171
immunosuppressant 913


    0
— —
    1
2.19 0.90, 4.77 0.061
1 OR = Odds Ratio, CI = Confidence Interval

Multivariate hosp_outcome_30days_status plot

model_hosp_outcome_30days_status <- glm(hosp_outcome_30days_status ~ year_10 + Gender_Legal_Sex + 
             vaccine_ACTUAL + htn + dm + cad  + copd + renal_group2 + 
             immunosuppressant, data = all, family = binomial())

# Extract coefficients, confidence intervals, and p-values
results <- tidy(model_hosp_outcome_30days_status , conf.int = TRUE, exponentiate = TRUE)  # Odds ratios (exp(beta))




results <- results%>%
   filter(term != "(Intercept)")%>%
  mutate(term = case_when(
    term == "year_10" ~ "Age, per 10 years",
    term == "Gender_Legal_SexMale" ~ "Male Sex",
    term == "vaccine_ACTUAL1" ~ "Vaccinated",
    term == "htn1" ~ "Hypertension",
    term == "dm1" ~ "Diabetes",
    term == "cad1" ~ "Coronary Artery Disease",
    term == "copd1" ~ "COPD",
    term == "renal_group2ESKD" ~ "End-Stage Kidney Disease",
    term == "renal_group2eGFR 30-44.9, no ESKD" ~ "eGFR 30-44 (No ESKD)",
    term == "renal_group2eGFR <30, no ESKD" ~ "eGFR <30 (No ESKD)",
    term == "immunosuppressant1" ~ "Receiving Immunosuppressants",
    TRUE ~ term
  ))

# Find the correct insertion position after mutation
insert_position <- which(results$term == "eGFR <30 (No ESKD)")[1]

# Add the reference row explicitly after mutation
multivariate_results <- results %>%
  add_row(
    term = "eGFR ≥45 (Reference)", 
    estimate = 1,
    conf.low = 1,
    conf.high = 1,
    .after = insert_position
  )

multivariate_results$term <- factor(multivariate_results$term, levels = rev(unique(multivariate_results$term)))



# Forest plot
ggplot(multivariate_results, aes(x = term, y = estimate)) +
  geom_point(size = 3, color = "black") +  # Point estimates (ORs)
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = 0.2) +  # CIs
  geom_hline(yintercept = 1, linetype = "dashed", color = "red") +  # Reference line at OR=1
  coord_flip() +  # Flip axes for forest plot style
  labs(x = "Variable", y = "Odds Ratio (95% CI)", title = "Hospital outcome 30days") +
  theme_minimal()

Unviariate Logistic regression cohort 913 death_status_30

Characteristic N OR1 95% CI1 p-value
age_bl 913 1.05 1.01, 1.09 0.010
vaccine_ACTUAL 913


    0
— —
    1
0.17 0.07, 0.37 <0.001
Gender_Legal_Sex 913


    Female
— —
    Male
1.60 0.73, 3.70 0.248
htn 913


    0
— —
    1
0.44 0.20, 1.04 0.050
dm 913


    0
— —
    1
0.42 0.16, 0.96 0.052
cad 913


    0
— —
    1
0.89 0.40, 1.96 0.780
copd 913


    0
— —
    1
2.85 1.19, 6.38 0.013
renal_group2 913


    eGFR 45-59.9, no ESKD
— —
    ESKD
1.89 0.41, 6.47 0.347
    eGFR 30-44.9, no ESKD
2.93 1.16, 7.47 0.021
    eGFR <30, no ESKD
3.50 0.93, 11.1 0.042
1 OR = Odds Ratio, CI = Confidence Interval

Multvariate logistic regression cohort 913 death_status_30

Characteristic N OR1 95% CI1 p-value
year_10 913 1.68 1.17, 2.53 0.008
Gender_Legal_Sex 913


    Female
— —
    Male
1.62 0.70, 3.93 0.273
vaccine_ACTUAL 913


    0
— —
    1
0.13 0.05, 0.32 <0.001
htn 913


    0
— —
    1
0.59 0.19, 1.83 0.355
dm 913


    0
— —
    1
0.38 0.13, 1.00 0.058
cad 913


    0
— —
    1
1.14 0.43, 3.14 0.792
copd 913


    0
— —
    1
4.75 1.76, 12.6 0.002
renal_group2 913


    eGFR 45-59.9, no ESKD
— —
    ESKD
4.63 0.93, 18.5 0.038
    eGFR 30-44.9, no ESKD
2.31 0.85, 6.30 0.096
    eGFR <30, no ESKD
2.14 0.51, 7.57 0.258
1 OR = Odds Ratio, CI = Confidence Interval

Multivariate death_status_30 plot

model_death_status_30 <- glm(death_status_30 ~ year_10 + Gender_Legal_Sex + 
             vaccine_ACTUAL + htn + dm + cad + copd + renal_group2, data = all, family = binomial())

# Extract coefficients, confidence intervals, and p-values
results <- tidy(model_death_status_30, conf.int = TRUE, exponentiate = TRUE)  # Odds ratios (exp(beta))

# Define custom variable labels

# Replace variable names with publication-friendly labels
results <- results %>%
  filter(term != "(Intercept)")%>%
  mutate(term = case_when(
    term == "year_10" ~ "Age, per 10 years",
    term == "Gender_Legal_SexMale" ~ "Male Sex",
    term == "vaccine_ACTUAL1" ~ "Vaccinated",
    term == "htn1" ~ "Hypertension",
    term == "dm1" ~ "Diabetes",
    term == "cad1" ~ "Coronary Artery Disease",
    term == "copd1" ~ "COPD",
    term == "renal_group2ESKD" ~ "End-Stage Kidney Disease",
    term == "renal_group2eGFR 30-44.9, no ESKD" ~ "eGFR 30-44 (No ESKD)",
    term == "renal_group2eGFR <30, no ESKD" ~ "eGFR <30 (No ESKD)",
    term == "immunosuppressant1" ~ "Receiving Immunosuppressants",
    TRUE ~ term  # Keep others unchanged
  ))
  
results$term <- factor(results$term, levels = rev(unique(results$term)))
# Forest plot
ggplot(results, aes(x = term, y = estimate)) +
  geom_point(size = 3, color = "black") +  # Point estimates (ORs)
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = 0.2) +  # CIs
  geom_hline(yintercept = 1, linetype = "dashed", color = "red") +  # Reference line at OR=1
  coord_flip() +  # Flip axes for forest plot style
  labs(x = "Variable", y = "Odds Ratio (95% CI)", title = "Death 30 days") +
  theme_minimal()

Kaplan Meier 365 days 3 groups