Reputation: 51
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
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