ROCbands {nsROC}R Documentation

Confidence bands for ROC curves

Description

This function computes and plots confidence bands for ROC curves (both left/right-sided and general one) using three different procedures. Particularly, one parametric approach assuming the binormal model (Demidenko) and two non-parametric techniques (Jensen et al. and Martinez-Camblor et al.). See References below.

Usage

ROCbands(groc, ...)
## Default S3 method:
ROCbands(groc, method = c("PSN", "JMS", "DEK"), conf.level = 0.95,
          B = 500, bootstrap.bar = TRUE, alpha1 = NULL, s = 1, a.J = NULL, b.J = NULL,
          plot.bands = FALSE, plot.var = FALSE, seed = 123, ...)

Arguments

groc

a 'groc' object from the gROC function.

method

method used to compute the confidence bands. One of "PSN" (Martinez-Camblor et al.), "JMS" (Jensen et al.) or "DEK" (Demidenko).

conf.level

the width of the confidence band as a number in (0,1). Default: 0.95, resulting in a 95% confidence band.

B

number of bootstrap replicates. Default: 500 (only used in "PSN" and "JMS" methods).

bootstrap.bar

if TRUE, a bar showing bootstrap replication progress is displayed.

alpha1

\alpha_1 in "PSN" approach a number in (0,1) affecting the width between the lower band and the ROC curve estimate. Default: NULL, the one which minimizes the theoretical area between lower and upper bands is considered.

s

scale parameter used to compute the smoothed kernel distribution functions in "PSN" method. The bandwidth h = s \cdot min(m,n)^{1/5} \cdot \hat{\sigma} where m and n stand by the number of controls and cases, respectively, is considered. Default: 1.

a.J, b.J

extremes of interval in (0,1) in which compute the regional confidence bands by "JMS" methodology. Default: (1/Ni, 1 - 1/Ni.).

plot.bands

if TRUE, confidence bands at level conf.level are displayed.

plot.var

if TRUE, a plot of \sigma_n^{*,1}(t) with t in [0,1] (if "PSN" method is selected) or Var(\Psi(p)) with p in (a.J, b.J) (if "JMS" method is selected) is displayed.

seed

seed used to compute the bootstrap controls and cases samples in "PSN" method or Brownian Bridges in "JMS" method.

...

additional arguments for ROCbands. Ignored.

Details

Value

A list of class 'rocbands' with the following content:

method

method used to compute the confidence bands. One of "PSN" (Martinez-Camblor et al.), "JMS" (Jensen et al.) or "DEK" (Demidenko).

conf.level

the width of the confidence band as a number in (0,1).

B

number of bootstrap replicates used in "PSN" and "JMS" methods.

L, U

vectors containing the values of lower and upper bands, respectively, for each t \in {0, 1/Ni, 2/Ni, ..., 1}. In case of "JMS" method p is considered as t.

practical.area

area between lower and upper bands (L and U) computed by trapezoidal rule.

Ni

number of subintervals of the unit interval considered to build the curve.

ROC.t

vector of values of R(t) for each t \in {0, 1/Ni, 2/Ni, ..., 1}.

If the method is "PSN":

s

scale parameter used to compute the smoothed kernel distribution functions.

alpha1, alpha2

if the alpha1 input argument is not specified, \alpha_1 and \alpha_2 values which minimize area between bands are automatically computed. If alpha1 is chosen by the user, alpha2 is computed by alpha1 = (1 - conf.level) - alpha1.

fixed.alpha1

if TRUE, alpha1 has been fixed by the user.

c1, c2

c_{\alpha_1} and c_{\alpha_2} resulting from the algorithm to compute confidence bands.

ROC.B

matrix of size Ni+1, B whose columns contain the ROC curve estimate for each bootstrap sample.

sd.PSN

vector \sigma_n^*(t) which is the estimate of the standard deviation of the empirical process considered.

theoretical.area

theoretical area between confidence bands by trapezoidal rule.

If the method is "JMS":

a.J, b.J

extremes of the interval in which the regional confidence bands have been computed.

p

vector of FPR points considered in the interval (a.J, b.J).

smoothROC.p

smooth ROC curve estimate for each value of p.

K.alpha

value of K_{a,b}^\alpha computed to calculate confidence bands (see Details above).

var.JMS

value of Var(\Psi(p)) estimated from the formula given by Hsieh and Turnbull (see Jensen et al. in References).

If the method is "DEK":

DEK.fpr, DEK.tpr

values of FPR and TPR computed to calculate the Demidenko confidence bands taking into account that it is a binormal technique.

Note

Brownian bridges needed to estimate \Psi(.) in "JMS" method are computed using the BBridge function in the sde package.

It should be noted that both the "PSN" and "JMS" methods are non-parametric, while the "DEK" approach is designed assuming the binormal model, so it is not convenient to use this method when distribution assumptions are not fulfilled. Furthermore, both the "JMS" and "DEK" methodologies are implemented just for the right-sided ROC curve. If side is left or both only the "PSN" method provides confidence bands.

References

Martinez-Camblor P., Perez-Fernandez S., Corral N., 2016, Efficient nonparametric confidence bands for receiver operating-characteristic curves, Statistical Methods in Medical Research, DOI: 10.1177/0962280216672490.

Jensen K., Muller H-H., Schafer H., 2000, Regional confidence bands for ROC curves, Statistical in Medicine, 19, 493-509.

Demidenko E., 2012, Confidence intervals and bands for the binormal ROC curve, Journal of Applied Statistics, 39(1), 67-79.

Examples

# Basic example
set.seed(123)
X <- c(rnorm(45), rnorm(30,2,1.5))
D <- c(rep(0,45), rep(1,30))
groc.obj <- gROC(X,D)

# PSN confidence bands with conf.level=0.95
ROCbands(groc.obj)
# Plot standard deviation estimate of the curve and confidence bands in the same window
ROCbands(groc.obj, plot.bands=TRUE, plot.var=TRUE)
# PSN confidence bands with alpha1 fixed (alpha1=0.025)
ROCbands(groc.obj, alpha1=0.025)

# JMS confidence bands in (0.2,0.7) interval
ROCbands(groc.obj, method="JMS", a.J=0.2, b.J=0.7)
# Plot variance estimate of the curve and confidence bands in the same window
ROCbands(groc.obj, method="JMS", a.J=0.2, b.J=0.7, plot.bands=TRUE, plot.var=TRUE)

# DEK confidence bands with conf.level=0.99
ROCbands(groc.obj, method="DEK", conf.level=0.99)


[Package nsROC version 1.1 Index]