surv_plot_cluster | R Documentation |
Plot a comparison between the unclusterized and clusterized survival.
surv_plot_cluster( x, data, time = "time", event = "event", x_cluster = paste0(x, "Cluster"), ... )
x |
name of the covariate column. |
data |
data.frame with the survival data. |
time |
name of the time variable column. |
event |
name of the censor/death variable column. |
x_cluster |
name of the clusterized covariate |
... |
extra arguments passed to 'survival::survfit'. |
This function uses the following wrapper to fit a KM estimate based on its arguments, for the clusterized and unclusterized column:
'survfit(formula(paste0("Surv(time,event)~", x)), data = data, ...)'
'survfit(formula(paste0("Surv(time,event)~", x_cluster)), data = data, ...)'
a plotly graph comparing the clusterization of 'x' with regard to wx.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.