View source: R/surv-concordance_survival.R
concordance_survival | R Documentation |
Compute the Concordance index for right-censored data
concordance_survival(data, ...)
## S3 method for class 'data.frame'
concordance_survival(
data,
truth,
estimate,
na_rm = TRUE,
case_weights = NULL,
...
)
concordance_survival_vec(
truth,
estimate,
na_rm = TRUE,
case_weights = NULL,
...
)
data |
A |
... |
Currently not used. |
truth |
The column identifier for the true survival result (that
is created using |
estimate |
The column identifier for the predicted time, this should be
a numeric variables. This should be an unquoted column name although this
argument is passed by expression and supports
quasiquotation (you can unquote column names). For
|
na_rm |
A |
case_weights |
The optional column identifier for case weights.
This should be an unquoted column name that evaluates to a numeric column
in |
The concordance index is defined as the proportion of all comparable pairs in which the predictions and outcomes are concordant.
Two observations are comparable if:
both of the observations experienced an event (at different times), or
the observation with the shorter observed survival time experienced an event, in which case the event-free subject “outlived” the other.
A pair is not comparable if they experienced events at the same time.
Concordance intuitively means that two samples were ordered correctly by the model. More specifically, two samples are concordant, if the one with a higher estimated risk score has a shorter actual survival time.
Larger values of the score are associated with better model performance.
A tibble
with columns .metric
, .estimator
,
and .estimate
and 1 row of values.
For grouped data frames, the number of rows returned will be the same as the number of groups.
For concordance_survival_vec()
, a single numeric
value (or NA
).
Emil Hvitfeldt
Harrell, F.E., Califf, R.M., Pryor, D.B., Lee, K.L., Rosati, R.A, “Multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors”, Statistics in Medicine, 15(4), 361-87, 1996.
concordance_survival(
data = lung_surv,
truth = surv_obj,
estimate = .pred_time
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.