| auc_ci | R Documentation |
Computes AUC together with a confidence interval, using pROC::ci.auc()
as the backend (DeLong by default, or bootstrap).
auc_ci(
truth,
prob,
positive = NULL,
conf_level = 0.95,
method = c("delong", "bootstrap"),
boot_n = 2000L,
digits = 4L
)
truth |
Factor (or coercible to factor) of true class labels. |
prob |
Predicted probability of the positive class, or a probability matrix/data frame with one column per class level. |
positive |
Optional positive class level. Defaults to the second factor level. |
conf_level |
Confidence level. |
method |
|
boot_n |
Number of bootstrap replicates when |
digits |
Number of digits numeric columns are rounded to. |
A one-row data frame with auc, conf_low, conf_high,
conf_level, and method.
if (requireNamespace("pROC", quietly = TRUE)) {
set.seed(1)
truth <- factor(rbinom(100, 1, 0.4))
prob <- runif(100)
auc_ci(truth, prob)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.