Calculates AUC (Area under the Curve) using trapezoidal approximation
auc(sens.v, spec.v)
a vector of sensitivities
A vector of specificities
# NOT RUN { # Calculate the AUC for a vector of hit rates and false alarm rates auc(sens.v = c(.1, .3, .5, .7), spec.v = c(.05, .1, .15, .3)) # }
Run the code above in your browser using DataCamp Workspace