| royston_survival | R Documentation |
Compute the Royston-Sauerbei D statistic
royston_survival(data, ...)
## S3 method for class 'data.frame'
royston_survival(data, truth, estimate, na_rm = TRUE, case_weights = NULL, ...)
royston_survival_vec(truth, estimate, na_rm = TRUE, case_weights = NULL, ...)
data |
A |
... |
Not currently used. |
truth |
The column identifier for the true survival result (that
is created using |
estimate |
The column identifier for the predicted linear predictor,
this should be a numeric variable. 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 |
Royston D statistic is a metric that should be maximized. The output ranges from 0 to 1, with 1 indicating perfect prognostic separation.
Royston and Sauerbrei proposed $R^2_D$ as a measure of explained variation on the log relative hazard scale based on the authors’ D statistic. D measures prognostic separation of survival curves, and is closely related to the standard deviation of the prognostic index.
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 royston_survival_vec(), a single numeric value (or NA).
Hannah Frick
Royston, P., Sauerbrei, W., "A new measure of prognostic separation in survival data", Statistics in Medicine, 23, 723-748, 2004.
All linear predictor survival metrics
royston_survival(
data = lung_surv,
truth = surv_obj,
estimate = .pred_linear_pred
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.