View source: R/plot.tdROC.cr.R
plot_tdROC_cr | R Documentation |
This function reads in object returned by tdROC.cr()
and plot ROC curve for it.
plot_tdROC_cr(
x,
lwd = 2,
xlab = "1-specificity",
ylab = "sensitivity",
xlim = c(0, 1),
ylim = c(0, 1),
col = c("red", "blue"),
main = "ROC curve",
abline = T,
...
)
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 |
col |
user-specified color for ROC curve. Defualt is " |
main |
user-specified title for the plot. Default is " |
abline |
user-specified reference diagnol line. Default is |
... |
for future methods |
Returns several plots of ROC curve. For competing risk data, there are two definitions of controls introduced by Zheng et al, which was listed below
\text{Definition A:} \text{Case} k:T \le \tau, \delta = k; \text{Control}_A: (T>\tau)\cup (T \le \tau \cap \delta \ne k)
\text{Definition B:} \text{Case} k:T \le \tau, \delta = k; \text{Control}_B: (T>\tau)
For more details about above two definitions, please read details of function tdROC.cr
.
If the tdROC.cr
object comes without bootstrap result, the ROC curve for above two definitions will be plotted together and indicated by the specified col
.
If the tdROC.cr
object with bootstrap result, one more ROC curve with confidence interval will be plotted for each definition.
Zheng Y, Cai T, Jin Y, Feng Z. Evaluating prognostic accuracy of biomarkers under competing risk. Biometrics. 2012;68(2):388-396. doi:10.1111/j.1541-0420.2011.01671.x
library(survival)
data(Melano)
tdROC.cr_res <- tdROC.cr(
X = Melano$thick, Y = Melano$time,
delta = Melano$status, tau = 1800, nboot = 10
)
plot_tdROC_cr(tdROC.cr_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.