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

Christine SINOQUET christine.sinoquet at univ-nantes.fr
Sun Mar 13 16:31:37 CET 2011


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



More information about the R-help mailing list