Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCumulative number of censoring #155
Comments
|
With
Fit survival curves: library(survival)
fit <- survfit( Surv(time, status) ~ sex, data = lung )Number of censoring as barplot: library(survminer)
ggsurvplot(fit, data = lung,
risk.table = TRUE,
cumevents = TRUE,
ncensor.plot = TRUE,
palette = "jco",
risk.table.height = 0.2,
cumevents.height = 0.2,
ncensor.plot.height = 0.2
)Cumulative number of censoring as table: library(survminer)
ggsurvplot(fit, data = lung,
risk.table = TRUE,
cumevents = TRUE,
cumcensor = TRUE,
palette = "jco",
risk.table.height = 0.2,
cumevents.height = 0.2,
ncensor.plot.height = 0.2
) |


As mentioned at #154 (comment),
the current version of
ggsurvplot()creates the ncensor plot, based on raw timing.Additional arguments are needed to display the cumulative number of censored subjects as a table.