0

I'm looking at survival analysis of a cohort that has no competing risks and would like to use log-rank comparisons instead of cox proportional hazard models.

I've been able to use tbl_uvregression with the coxph function as below (for simplicity there is only one covariate):

# univariate regression
tbl_uv_ex2 <-
  tbl_uvregression(
    trial1[c("endpoint", "Recurrence", "Cohort")],
    method = coxph,
    y = Surv(endpoint, event = Recurrence == 1),
    exponentiate = TRUE,
    pvalue_fun = function(x) style_pvalue(x, digits = 2)
  )
print(tbl_uv_ex2)

But have not been able to get it to work by substituting method for survdiff(rho = 0). But it does work if I do not use it with the tbl_regression wrapper (as below).

# Log-rank UVA
LR <- survdiff(Surv(`endpoint`, `Recurrence`) ~ `Cohort`, data= trial1, rho = 0)
print(LR)

Question: how can I use tbl_uvregression with surfdiff(rho = 0) [i.e. log-rank] method?

Thanks!

  • The package has a function to report Kaplan Meier estimates and compare groups with the log rank test. https://www.danieldsjoberg.com/gtsummary/reference/add_p.tbl_survfit.html – Daniel D. Sjoberg Oct 12 '22 at 14:20

0 Answers0