plot_tdROC {tdROC} | R Documentation |
Plot the time-dependent ROC curve
Description
This function reads in object returned by tdROC()
and plot ROC curve for it.
Usage
plot_tdROC(
x,
lwd = 2,
xlab = "1-specificity",
ylab = "sensitivity",
xlim = c(0, 1),
ylim = c(0, 1),
main = "ROC curve",
col = "black",
abline = T,
...
)
Arguments
x |
the object returned by |
lwd |
user-specified line width. Default is |
xlab |
user-specified label for x-axis. Default is " |
ylab |
user-specified label for y-axis. Default is " |
xlim |
user-specified limit for x axis. Default is |
ylim |
user-specified limit for y axis. Default is |
main |
user-specified title for the plot. Default is " |
col |
user-specified color for ROC curve. Defualt is " |
abline |
user-specified reference diagnol line. Default is |
... |
for future methods |
Value
Returns a plot of ROC curve. If the tdROC object comes with bootstrap result, then the ROC curve will be plotted with confidence interval.
Examples
library(survival)
data(mayo)
dat <- mayo[, c("time", "censor", "mayoscore5")]
fm <- tdROC(
X = dat$mayoscore5, Y = dat$time, delta = dat$censor,
tau = 365 * 6, span = 0.1, nboot = 0, alpha = 0.05, n.grid = 1000, cut.off = 5:9
)
# plot the object "fm" from tdROC()
plot_tdROC(fm)
[Package tdROC version 2.0 Index]