cindex | R Documentation |
A thin wrapper around survival::concordance which essentially
just sets reverse = TRUE
.
cindex(risk, truth, ...)
risk |
( |
truth |
( |
... |
( |
The numeric value of the index.
if (!requireNamespace("survival", quietly = TRUE)) {
set.seed(10)
data <- simsurvdata(20)
fit <- deepsurv(data = data[1:10, ])
p <- predict(fit, type = "risk", newdata = data[11:20, ])
concordance(risk = p, truth = data[11:20, "time"])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.