# ci.thresholds(...)
## S3 method for class 'roc':
ci.thresholds(roc, conf.level=0.95, boot.n=2000,
boot.stratified=TRUE, thresholds = "local maximas",
progress=getOption("pROCProgress")$name, parallel=FALSE, ...)
## S3 method for class 'formula':
ci.thresholds(formula, data, ...)
## S3 method for class 'smooth.roc':
ci.thresholds(smooth.roc, ...)
## S3 method for class 'default':
ci.thresholds(response, predictor, ...)roc function.roc function.roc function.roc$thresholds) or a character name argument to create_progress_broc and ci.thresholds.roc
when calling ci.thresholds.default or ci.thresholds.formula.
boot.stratified=FALSE and the sample has a large imbalance between
cases and controls, it could happen that one or more of the replicates
contains no case or control observation, producing a NA area.
The warning boot.stratified=TRUE.ci.thresholds.formula and ci.thresholds.default are convenience methods
that build the ROC curve (with the roc function) before
calling ci.thresholds.roc. You can pass them arguments for both
roc and ci.thresholds.roc. Simply use ci.thresholds
that will dispatch to the correct method. This function creates boot.n bootstrap replicate of the ROC
curve, and evaluates the sensitivity and specificity at thresholds
given by the thresholds argument. Then it computes the
confidence interval as the percentiles given by conf.level.
For more details about the bootstrap, see the Bootstrap section in this package's documentation.
Tom Fawcett (2006) ``An introduction to ROC analysis''. Pattern
Recognition Letters 27, 861--874. DOI:
roc,
ci
CRAN package data(aSAH)
# Syntax (response, predictor):
ci.thresholds(aSAH$outcome, aSAH$s100b)
# With a roc object:
rocobj <- roc(aSAH$outcome, aSAH$s100b)
ci.thresholds(rocobj)
# Customized bootstrap and specific thresholds:
ci.thresholds(aSAH$outcome, aSAH$s100b,
boot.n=500, conf.level=0.9, stratified=FALSE,
thresholds=c(0.5, 1, 2))
# Alternatively, you can get the CI directly from roc():
rocobj <- roc(aSAH$outcome,
aSAH$s100b, ci=TRUE, of="thresholds")
rocobj$ci
# Plotting the CI
plot(rocobj)
plot(rocobj$ci)Run the code above in your browser using DataLab