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 tdROC().

lwd

user-specified line width. Default is 2.

xlab

user-specified label for x-axis. Default is "1-specificity".

ylab

user-specified label for y-axis. Default is "sensitivity".

xlim

user-specified limit for x axis. Default is c(0,1).

ylim

user-specified limit for y axis. Default is c(0,1).

main

user-specified title for the plot. Default is "ROC curve"

col

user-specified color for ROC curve. Defualt is "black".

abline

user-specified reference diagnol line. Default is True.

...

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]