Gonzalo SB
Gonzalo SB

Reputation: 51

How can I get the standard error of an AUC in ROCR?

I'm using ROCR to obtain the AUC indices. I want to have also the standard errors of the AUC but in the default outputs they are not shown. Is there any way of obtaining them?

Example:

library(ROCR)
a<-rnorm(100,1)
b<-sample(0:1,100,TRUE)
pred<-prediction(a,b)
auc<-performance(pred,"auc")
[email protected]

Thanks in advance for any help!

Upvotes: 3

Views: 4847

Answers (1)

Calimo
Calimo

Reputation: 7969

As far as I know, ROCR doesn't calculate standard errors, which is why the aren't shown.

You can obtain them with the pROC package (disclaimer: I am its author).

myROC <- roc(b, a) 
var(myROC)

Take the square root to obtain the standard deviation, which in this case is the standard error (because the AUC is a sample-mean).

Upvotes: 3

Related Questions