Description Usage Arguments Value Author(s) Examples
Distribution of Events' Times
1 2 3 4 5 6 7 8 9 10 11 |
surv |
an object of Surv. If not suplied, the censoring variable is extracted from the model. |
fit |
an object of class survfit. |
data |
a dataset for predictions. If not supplied then data will be extracted from 'fit' object. |
type |
one of |
normalized |
if |
censored.on.top |
is TRUE then censored events are on the top |
ggtheme |
function, ggplot2 theme name. Allowed values include ggplot2 official themes: see theme. |
palette |
the color palette to be used for coloring of significant variables. |
... |
other graphical parameters to be passed to the function ggpar. |
return an object of class ggplot
Przemyslaw Biecek, przemyslaw.biecek@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | require("survival")
# from Surv
surv <- Surv(lung$time, lung$status)
ggsurvevents(surv)
surv2 <- Surv(colon$time, colon$status)
ggsurvevents(surv2)
ggsurvevents(surv2, normalized = TRUE)
# from survfit
fit <- survfit(Surv(time, status) ~ sex, data = lung)
ggsurvevents(fit = fit, data = lung)
# from coxph
model <- coxph( Surv(time, status) ~ sex + rx + adhere, data = colon )
ggsurvevents(fit = model, data = colon)
ggsurvevents(surv2, normalized = TRUE, type = "radius")
ggsurvevents(surv2, normalized = TRUE, type = "fraction")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.