data(dataDIVAT3)
# A subgroup analysis to reduce the time needed for this example
dataDIVAT3 <- dataDIVAT3[1:400,]
# The time-dependent ROC curve to evaluate the
# capacities of the recipient age for the prognosis of post-kidney
# transplant mortality up to 2000 days.
# Compute the raw sensitivity and specificity
roc1 <- roc(times="death.time", failures="death", variable="ageR",
confounders=~1, data=dataDIVAT3, pro.time=2000,
precision=seq(0.1,0.9, by=0.2))
plot(roc1, type="b", col=1, pch=2, lty=2, xlab="1-specificity", ylab="sensibility")
Run the code above in your browser using DataLab