
of
argument controls the type of CI that will be computed.
By default, the 95% CI are computed with 2000 stratified bootstrap
replicates.ci(...)
## S3 method for class 'roc':
ci(roc, of = c("auc", "thresholds", "sp", "se"), ...)
## S3 method for class 'smooth.roc':
ci(smooth.roc, of = c("auc", "sp", "se"), ...)
## S3 method for class 'formula':
ci(formula, data, ...)
## S3 method for class 'default':
ci(response, predictor, ...)
roc
function, or a smooth.roc
function.roc
function.roc
function.ci
functions
ci.auc
, ci.thresholds
, ci.sp
or ci.se
, depending on the
of
argument.ci.formula
and ci.default
are convenience methods
that build the ROC curve (with the roc
function) before
calling ci.roc
. You can pass them arguments for both
roc
and ci.roc
. Simply use ci
that will dispatch to the correct method.
This function is typically called from roc
when ci=TRUE
(not by
default). Depending on the of
argument, the specific
ci
functions ci.auc
, ci.thresholds
,
ci.sp
or ci.se
are called.roc
, auc
, ci.auc
,
ci.thresholds
, ci.sp
, ci.se
data(aSAH)
# Syntax (response, predictor):
ci(aSAH$outcome, aSAH$s100b)
# With a roc object:
rocobj <- roc(aSAH$outcome, aSAH$s100b)
# Of an AUC
ci(rocobj)
ci(rocobj, of="auc")
# this is strictly equivalent to:
ci.auc(rocobj)
# Of thresholds, sp, se...
ci(rocobj, of="thresholds")
ci(rocobj, of="thresholds", thresholds=0.51)
ci(rocobj, of="thresholds", thresholds="all")
ci(rocobj, of="sp", sensitivities=c(.95, .9, .85))
ci(rocobj, of="se")
# Alternatively, you can get the CI directly from roc():
rocobj <- roc(aSAH$outcome, aSAH$s100b, ci=TRUE, of="auc")
rocobj$ci
Run the code above in your browser using DataLab