I have created a ROC plot with multiple ROC-curves using ggroc based on pROC. How can I insert a line of no discrimination?
I would like to have a line of no discrimination from 0,0 to 1,1 in my plot, so that I can better visually evaluate my ROC-curves.
I have tried using the plot() function on my ggplot object, and I have tried using + geom_abline(), and the lines() function without any luck.
library(pROC)
#Creating curves and labeling)
ROC_curves <- ggroc(list(log=ROC_log, tree=ROC_tree, xgbt=ROC_xgbt), legacy.axes=TRUE)
ROC_curves2 <- ROC_curves + xlab("FPR") + ylab("TPR")
#but this part doesn't Work:
+ qplot(1,1) + geom_abline(intercept=0, slope=1)
I have also tried doing: plot(ROC_curves2, identity=TRUE)
I would like a line of no discrimination going from 0,0 to 1,1 in my plot.
When adding qplot(1,1) + geom_abline(), I get "Error: Don't know how to add o to a plot". When using plot() a plot is returned, but still with no line.