plot.surv_model_performance {survex} | R Documentation |
Plot Model Performance Metrics for Survival Models
Description
This function plots objects of class "surv_model_performance"
- visualization of
metrics of different models created using the model_performance(..., type="metrics")
function.
Usage
## S3 method for class 'surv_model_performance'
plot(
x,
...,
metrics = NULL,
metrics_type = "time_dependent",
title = "Model performance",
subtitle = "default",
facet_ncol = NULL,
colors = NULL,
rug = "all",
rug_colors = c("#dd0000", "#222222")
)
Arguments
x |
an object of class |
... |
additional objects of class |
metrics |
character, names of metrics to be plotted (subset of C/D AUC", "Brier score" for |
metrics_type |
character, either one of |
title |
character, title of the plot |
subtitle |
character, subtitle of the plot, |
facet_ncol |
number of columns for arranging subplots |
colors |
character vector containing the colors to be used for plotting variables (containing either hex codes "#FF69B4", or names "blue") |
rug |
character, one of |
rug_colors |
character vector containing two colors (containing either hex codes "#FF69B4", or names "blue"). The first color (red by default) will be used to mark event times, whereas the second (grey by default) will be used to mark censor times. |
Value
An object of the class ggplot
.
See Also
Other functions for plotting 'model_performance_survival' objects:
plot.model_performance_survival()
,
plot.surv_model_performance_rocs()
Examples
library(survival)
library(survex)
model <- randomForestSRC::rfsrc(Surv(time, status) ~ ., data = veteran)
exp <- explain(model)
m_perf <- model_performance(exp)
plot(m_perf)