This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plotting two ROC curves

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

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

Thank you so much. So helpful!!

1 answer

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")

I really appreciate your help!

Log in to answer this question.