在proc中添加第二条auc行

问题描述

我正在尝试使用pROC在一张图上绘制两条auc线,并且需要有关此编码的帮助:

`library("pROC")
setwd("./")
mydata <- read.csv("page1-cov.profile.txt",header=TRUE,sep="\t")
reg.full<-glm(formula = PHENO~scoreSUM+PC1+PC2+PC3+age+sex,family = "binomial",data=mydata)
pred.full<-predict(reg.full,type=c("response"))
auc.roc<-roc(mydata$PHENO,pred.full)$auc
roc<-roc(mydata$PHENO,pred.full)
rocobj <- plot.roc (mydata$PHENO,pred.full,percent = TRUE,ci = TRUE,legacy.axes = TRUE,print.auc = TRUE,main="ROC curve with 95% CIs")
ciobj <- ci.se(rocobj,specificities = seq(0,100,5))
plot(ciobj,type = "shape",col = "#1c61b6AA")
plot(ci(rocobj,of = "thresholds",thresholds = "best",col = "yellow",lwd = 2))`

Now I want to add this line to make second AUC curve all in one plot:

`reg.prs<-glm(formula = PHENO~score1,data=mydata)`

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)