auc | R Documentation |
This function computes the area under ROC curve by using the trapezoidal rule.
auc(sens, spec)
sens |
A numeric vector with the sensitivities |
spec |
A numeric vector with the specificities |
This function computes the area under ROC curve using the trapezoidal rule from two vectors of sensitivities and specificities. The value of the area is directly returned.
Y. Foucher <Yohann.Foucher@univ-poitiers.fr>
se.temp <- c(0, 0.5, 0.5, 1)
sp.temp <- c(1, 0.5, 0.5, 0)
auc(se.temp, sp.temp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.