library(pROC) a=read.csv("~/Desktop/a3.txt",sep=",",header=FALSE) p=read.csv("~/Desktop/p3.txt",sep=",",header=FALSE) a1 <- unlist(a) p1 <- unlist(p) roc(a1, p1) roc1 <- roc(a1,p1, percent=TRUE, # arguments for ci ci=TRUE, boot.n=100, ci.alpha=0.9, stratified=FALSE, # arguments for plot plot=TRUE, auc.polygon=TRUE, max.auc.polygon=TRUE, grid=TRUE, print.auc=TRUE, show.thres=TRUE) # CI of the curve sens.ci <- ci.se(roc1, specificities=seq(0, 100, 5)) plot(sens.ci, type="shape", col="lightblue") plot(sens.ci, type="bars")