[R] use of ROCR package (ROC curve / AUC value) in a specific case versus integral calculation

From: Christine SINOQUET <christine.sinoquet_at_univ-nantes.fr>
Date: Sun, 13 Mar 2011 16:31:37 +0100


Hello,

I would like to use the ROCR package to draw ROC curves and compute AUC values.

However, in the specific context of my application, the true positive rates and false positive rates are already provided by some upstream method.

Of course, I can draw a ROC plot with the following command :

plot(x=FPrate, y=TPrate, "o", xlab="false positive rate", ylab="true positive rate", xlim=c(0, 1), ylim=c(0, 1)

but this will bot compute the AUC value.

There are two possibilities :
Either it is possible to use the above parameters - FPrate and TPrate vectors- to run the performance function and I would like to know how,

or it is not possible and I have to compute the area under the curve but I cannot find on the Web how to perform this, through an R package, using the two vectors above, if possible (I would rather not implement an integration algorithm).

I thank you in advance for your answer.

Best regards,

Christine Sinoquet



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 13 Mar 2011 - 16:46:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Mar 2011 - 21:20:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive