This function computes the confidence interval (CI) of an area under the curve (AUC).
# ci.auc(...)
# S3 method for roc
ci.auc(roc, conf.level=0.95, method=c("delong",
"bootstrap"), boot.n = 2000, boot.stratified = TRUE, reuse.auc=TRUE,
progress = NULL, parallel=FALSE, ...)
# S3 method for smooth.roc
ci.auc(smooth.roc, conf.level=0.95, boot.n=2000,
boot.stratified=TRUE, reuse.auc=TRUE,
progress = NULL, parallel=FALSE, ...)
# S3 method for auc
ci.auc(auc, ...)
# S3 method for multiclass.roc
ci.auc(multiclass.roc, ...)
# S3 method for multiclass.auc
ci.auc(multiclass.auc, ...)
# S3 method for auc
ci.auc(auc, ...)
# S3 method for formula
ci.auc(formula, data, ...)
# S3 method for default
ci.auc(response, predictor, ...)A numeric vector of length 3 and class “ci.auc”, “ci” and “numeric” (in this order), with the lower bound, the median and the upper bound of the CI, and the following attributes:
the width of the CI, in fraction.
the method employed.
the number of bootstrap replicates.
whether or not the bootstrapping was stratified.
an object of class “auc” stored for reference about the compued AUC details (partial, percent, ...)
The aucs item is not included in this list since version 1.2 for
consistency reasons.
This function computes the CI of an AUC. Two methods are available:
“delong” and “bootstrap” with the parameters defined in “roc$auc” to
compute a CI. When it is called with two vectors (response, predictor)
or a formula (response~predictor) arguments, the roc
function is called to build the ROC curve first.
The default is to use the “delong” method, except for comparison of
partial AUC and smoothed curves, where bootstrap is used. Using
“delong” for partial AUC and smoothed ROCs is not supported.
With method="bootstrap", the function calls auc
boot.n times. For more details about the bootstrap, see the Bootstrap section in
this package's documentation.
For smoothed ROC curves, smoothing is performed again at each
bootstrap replicate with the parameters originally provided.
If a density smoothing was performed with user-provided
density.cases or density.controls the bootstrap cannot
be performed and an error is issued.
With method="delong", the variance of the AUC is computed as
defined by DeLong et al. (1988) using the algorithm by Sun and Xu (2014)
and the CI is deduced with qnorm.
CI of multiclass ROC curves and AUC is not implemented yet. Attempting to call these methods returns an error.
James Carpenter and John Bithell (2000) ``Bootstrap condence intervals: when, which, what? A practical guide for medical statisticians''. Statistics in Medicine 19, 1141--1164. DOI: tools:::Rd_expr_doi("10.1002/(SICI)1097-0258(20000515)19:9<1141::aid-sim479>3.0.CO;2-F").1141::aid-sim479>
Elisabeth R. DeLong, David M. DeLong and Daniel L. Clarke-Pearson (1988) ``Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach''. Biometrics 44, 837--845.
Xu Sun and Weichao Xu (2014) ``Fast Implementation of DeLongs Algorithm for Comparing the Areas Under Correlated Receiver Operating Characteristic Curves''. IEEE Signal Processing Letters, 21, 1389--1393. DOI: tools:::Rd_expr_doi("10.1109/LSP.2014.2337313").
Xavier Robin, Natacha Turck, Alexandre Hainard, et al. (2011) ``pROC: an open-source package for R and S+ to analyze and compare ROC curves''. BMC Bioinformatics, 7, 77. DOI: tools:::Rd_expr_doi("10.1186/1471-2105-12-77").
Hadley Wickham (2011) ``The Split-Apply-Combine Strategy for Data Analysis''. Journal of Statistical Software, 40, 1--29. URL: tools:::Rd_expr_doi("10.18637/jss.v040.i01").
roc, auc, ci