# Dummy dataset.
score.ex <- runif(1000, 0, 1)
class.ex <- lapply(score.ex, function(x){rbinom(1,1,x)})
class.ex <- unlist(class.ex)
# Calculate ROC curve.
ROC.ex <- calcROC(score.ex, class.ex)
# Estimates EMP with point masses in 0.1 and 0.9, and 0.1 ROI
EMP.ex <- EMP_CS(ROC.ex, 0.1, 0.1, 0.1)
EMP.ex
Run the code above in your browser using DataLab