pharmaverse / ggsurvfit

http://www.danieldsjoberg.com/ggsurvfit/
Other
67 stars 19 forks source link

Feature request: Expand ggsurvfit to include cox regression objects to plot adjusted survival curves #186

Closed Yunuuuu closed 6 months ago

Yunuuuu commented 6 months ago

This request was made in https://github.com/pharmaverse/ggsurvfit/issues/140, but the content leads us to a currently missing issue at https://github.com/ddsjoberg/ggsurvfit/issues/9. Following is the implement of survminer while it cannot add a risk table.

library(survival)
library(survminer)
#> Loading required package: ggplot2
#> Loading required package: ggpubr
#>
#> Attaching package: 'survminer'
#> The following object is masked from 'package:survival':
#>
#>     myeloma
fit <- coxph(Surv(stop, event) ~ size + strata(rx), data = bladder)
ggadjustedcurves(fit, data = bladder, variable = "rx")

image Created on 2023-12-15 with reprex v2.0.2

Yunuuuu commented 6 months ago

Sorry, I missed the feature described in https://www.danieldsjoberg.com/ggsurvfit/articles/gallery.html. It would be beneficial to add more detailed descriptions to the help documents at https://www.danieldsjoberg.com/ggsurvfit/reference/survfit2.html.

For me, it would be okay to close the issue.

ddsjoberg commented 6 months ago

Thanks for the posts