surv_extract_km | R Documentation |
Uses a previously adjusted survfit model and returns the results in a standard and convenient way. Works only for K-M estimates.
surv_extract_km(aj)
aj |
aj previously fitted model (using 'survival::survfit()'). |
a data.frame with the following columns: 'time', 'id', 'surv' and 'wx'. 'id' is the value of the covariates in the model. If more than one covariate is used, they are merged together using 'tidyr::unite'. 'surv' is the survival probability and 'wx' is n.event/n.risk, closely related with the probability of failing before x + 1, for individuals alive at x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.