# NOT RUN {
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)
# }
# 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)
# }
Run the code above in your browser using DataLab