library(ROCnReg)
data(psa)
# Select the last measurement
newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),]
# Log-transform the biomarker
newpsa$l_marker1 <- log(newpsa$marker1)
newdf <- cROCData(newpsa, "age", "status")
summary(newdf)
Run the code above in your browser using DataLab