plot.roc 显示任意cutoff

cutoff=x
pdf("new_train_ROC.pdf",height=6,width=6)
x <- plot.roc(plot_data[,2],as.numeric(plot_data[,4]) ,ylim=c(0,1),xlim=c(1,0),
              smooth=F, #绘制平滑曲线
              ci=TRUE, 
              boot.n=100,
              main="",
              print.thres=cutoff, #把阈值写在图上,其sensitivity+ specificity之和最大
              
              lwd=2, #线的粗细
              legacy.axes=T, col="red")#

x$auc
legend.name <- paste("LncRNA Signature ","AUC",round(x$auc,4),sep=" ")


legend("bottomright", legend = legend.name, col = c("red"),lwd = 2)

dev.off()
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容