R: Function to compute a bootstrap confidence interval for the...
confIntBootLogConROC_t0
R Documentation
Function to compute a bootstrap confidence interval for the ROC curve at a given t, based on the log-concave ROC curve
Description
This function computes a bootstrap confidence interval for the ROC curve at a given value false negative fraction (1 - specificity) t. The ROC curve estimate is based on log-concave densities, as discussed in Rufibach (2011).
Values of the continuous variable for the controls.
grid
Values of 1 - specificity where confidence intervals should be computed at (may be a vector).
conf.level
Confidence level of confidence interval.
M
Number of bootstrap replicates.
smooth
Logical. Compute confidence interval also for ROC curve estimate based on smoothed log-concave densities.
output
Logical. Show progress of computations?
Value
A list containing the following elements:
qs
data.frame with the columns t (false positive fractions where confidence interval is computed at) and the confidence intervals for the ROC curve at grid, based on the log-concave density estimate.
boot.mat
Bootstrap samples for the ROC curve based on the log-concave density estimate.
qs.smooth
If smooth = TRUE, same as qs but for the ROC curve based on the smooth log-concave density estimate.
boot.mat.smooth
If smooth = TRUE, bootstrap samples for the ROC curve based on the smoothed log-concave density estimate.
Note
The confidence intervals are only valid if observations are independent, i.e. eacht patient only contributes one measurement, e.g.
The reference for computation of these bootstrap confidence intervals is:
Rufibach, K. (2012).
A smooth ROC curve estimator based on log-concave density estimates.
Int. J. Biostat., 8(1), 1–29.
The bootstrap competitor based on the empirical ROC curve is described in:
Zhou, X.H. and Qin, G. (2005).
Improved confidence intervals for the sensitivity at a fixed level of specificity of a continuous-scale diagnostic test.
Statist. Med., 24, 465–477.
See Also
The ROC curve based on log-concave density estimates can be computed using logConROC. In the example below we analyze the pancreas data.
Examples
## Not run:
## ROC curve for pancreas data
data(pancreas)
status <- factor(pancreas[, "status"], levels = 0:1, labels = c("healthy", "diseased"))
var <- log(pancreas[, "ca199"])
cases <- var[status == "diseased"]
controls <- var[status == "healthy"]
## compute confidence intervals
res <- confIntBootLogConROC_t0(controls, cases, grid = c(0.2, 0.8), conf.level = 0.95,
M = 1000, smooth = TRUE, output = TRUE)
res
## End(Not run)