Plotting two ROC curves
1
0
Entering edit mode
5.3 years ago
khn ▴ 130

Hello,

Do you know how to draw two ROC curves together? I showed that two SNPs are relevant to develop a disease, and I want to show how ROC curve improves if I add one SNP to the other SNP.

Just using par(new=T) creates two x-axis and y-axis, so I want to draw two curves and one x&y-axis.

Thank you!

R • 5.5k views
ADD COMMENT
2
Entering edit mode
ADD REPLY
0
Entering edit mode

Thank you so much. So helpful!!

ADD REPLY
1
Entering edit mode

I changed your post type from 'Tool' to 'Question'. The 'Tool' type is meant for promotion of novel tools.

ADD REPLY
4
Entering edit mode
5.3 years ago

Try with the R pROC package:

library(pROC)

roc1 <- plot.roc(outcome1, prediction1, main="ROC comparison", percent=TRUE, col= "red")
roc2 <- lines.roc(outcome2, prediction2, percent=TRUE, col="blue")
ADD COMMENT
0
Entering edit mode

I really appreciate your help!

ADD REPLY

Login before adding your answer.

Traffic: 2917 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6