lynnyi
lynnyi

Reputation: 1352

How to plot specific points on ROC curve

I'm using pROC package to plot receiver operating curves using the function:

plot(roc(true, predictor))

I also want to highlight points on the curve corresponding to specific p-values. Let's say I know which predictor values correspond to my specific p-values. How can I do this?

Upvotes: 0

Views: 2251

Answers (1)

Calimo
Calimo

Reputation: 7949

I assume that you mean predictor values corresponding to specific thresholds, not p-values. In this case with pROC you should use the print.thres argument. For instance if you want to highlight the threshold 2.2 on your predictor, you can write:

my.threshold <- 2.2
plot(roc(true, predictor), print.thres = my.threshold)

See ?plot.roc for more options.

Upvotes: 1

Related Questions