data(HCC)
# ROC curve estimates for gene 03515901 and response tumor
rroc <- gROC(X = HCC[,"cg03515901"], D = HCC$tumor) # Right-sided
lroc <- gROC(X = HCC[,"cg03515901"], D = HCC$tumor, side = "left") # Left-sided
hroc <- hROC(X = HCC[,"cg03515901"], D = HCC$tumor) # Transformed by a cubic polinomial
plot(rroc, lty = 2, frame = FALSE)
plot(lroc, new = FALSE)
plot(hroc, new = FALSE, col = "blue")
legend("topleft", legend = c("Right-sided", "Left-sided", "Transformed marker"),
col = c("black", "black", "blue"), lty = c(1,2,1), lwd = 2, bty = "n")
# ROC curve estimate for genes 20202438 and 18384097 to simultaneously identify tumor
# by a logistic regression model with quadratic formula
biroc <- multiROC(X = cbind(HCC$cg20202438, HCC$cg18384097), D = HCC$tumor)
plot(biroc)
legend("bottomright", paste("AUC = ", format(biroc$auc, digits = 3)))
# ROC curve estimate for genes 20202438, 18384097 and 03515901 to simultaneously
# identify tumor by a linear combinations with fixed parameters by Pepe and Thompson (2000)
multiroc <- multiROC(X = cbind(HCC$cg20202438, HCC$cg18384097, HCC$cg03515901),
D = HCC$tumor, method = "fixedLinear", methodLinear = "PepeThompson")
plot(multiroc)
legend("bottomright", paste("AUC = ", format(multiroc$auc, digits = 3)))
Run the code above in your browser using DataLab