data(aSAH)
## Not run:
# # Syntax (response, predictor):
# ci.sp(aSAH$outcome, aSAH$s100b)
#
# # With a roc object:
# rocobj <- roc(aSAH$outcome, aSAH$s100b)
# ci.sp(rocobj)
#
# # Customized bootstrap and specific specificities:
# ci.sp(rocobj, c(.95, .9, .85), boot.n=500, conf.level=0.9, stratified=FALSE)
# ## End(Not run)
# Alternatively, you can get the CI directly from roc():
rocobj <- roc(aSAH$outcome,
aSAH$s100b, ci=TRUE, of="sp", boot.n=100)
rocobj$ci
# Plotting the CI
plot(rocobj)
plot(rocobj$ci)
## Not run:
# # On a smoothed ROC, the CI is re-computed automatically
# smooth(rocobj)
# # Or you can compute a new one:
# ci.sp(smooth(rocobj, method="density", reuse.ci=FALSE), boot.n=100)
# ## End(Not run)
Run the code above in your browser using DataLab