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