plot.surv_model_performance_explainer: Plot for surv_model_performance object

Description Usage Arguments Examples

View source: R/plot_model_performance.R

Description

Function plot for surv_model_performance object.

Usage

1
2
## S3 method for class 'surv_model_performance_explainer'
plot(x, ...)

Arguments

x

object of class "surv_model_performance"

...

optional, additional objects of class "surv_model_performance_explainer"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(survxai)
library(rms)
data("pbcTest")
data("pbcTrain")
predict_times <- function(model, data, times){
                  prob <- rms::survest(model, data, times = times)$surv
                  return(prob)
                  }
cph_model <- cph(Surv(years, status)~sex + bili + stage, data=pbcTrain, surv=TRUE, x = TRUE, y=TRUE)
surve_cph <- explain(model = cph_model, data = pbcTest[,-c(1,5)],
                    y = Surv(pbcTest$years, pbcTest$status), predict_function = predict_times)
mp_cph <- model_performance(surve_cph)
plot(mp_cph)

survxai documentation built on Aug. 28, 2020, 5:07 p.m.