1
$\begingroup$

I have two distributions p1 and p2 (generating in R using distr package), and I want to compute the area under the ROC curve. To construct the ROC curve, I have to compute the probability of detection $p_D = \int_{T}^{\infty}{p2}$ and the probability of false alarm $p_{FA} = \int_{T}^{\infty}{p1}$ for each threshold T. Thus, for each threshold T, I have a point ($p_{FA}$, $p_{D}$) in the ROC curve. Then, from these points, I can compute the area under the curve. I ask if there is a direct way (function in R or other) to compute the area under the ROC curve using p1 and p2 distributions?

$\endgroup$

1 Answer 1

3
$\begingroup$

Yes, have a look on the pROC package.
You can create a roc object with the function roc, the AUC is computed by default.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.