Description Usage Arguments Details Value Note References Examples
This function computes and plots confidence bands for ROC curves (both left/rightsided and general one) using three different procedures. Particularly, one parametric approach assuming the binormal model (Demidenko) and two nonparametric techniques (Jensen et al. and MartinezCamblor et al.). See References below.
1 2 3 4 5 
groc 
a 'groc' object from the 
method 
method used to compute the confidence bands. One of "PSN" (MartinezCamblor 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 
α_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{σ} 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 
plot.var 
if TRUE, a plot of σ_n^{*,1}(t) with t in [0,1] (if "PSN" method is selected) or Var(Ψ(p)) with p in ( 
seed 
seed used to compute the bootstrap controls and cases samples in "PSN" method or Brownian Bridges in "JMS" method. 
... 
additional arguments for 
MartinezCamblor et al. methodology  "PSN" method
The theoretical.area
is computed as (c_{α_1}  c_{α_2}) n^{1/2} \int σ_n^*(t) dt where σ_n^*(t) is the standard deviation estimate of √{n} [\hat{R}(ω, .)  R(.)] and n is the cases sample size.
Due to computation can take some time depending on the number of bootstrap replicates considered, a progress bar is shown.
Confidence bands are truncated in the following way: on one hand, if the lower band is lower than 0 or higher than 0.95 it is forced to be 0 or 0.95, respectively; on the other hand, if the upper band is higher than 1 or lower than 0.05 it is forced to be 1 or 0.05, respectively.
Jensen et al. methodology  "JMS" method
K^α_{a,b} denote the upper α/2quantile of the distribution of \sup_{a ≤ p ≤ b} \frac{Ψ(p)}{√{Var Ψ(p)}} where (a,b) is the interval in which the regional confidence bands are calculated and Ψ(.) is the limiting process of the stochastic process Δ_N = √{N} [\hat{R}(ω, .)  R(.)] with N being the total sample size.
Extremes of the interval (a.J
, b.J
) used in order to display the regional confidence bands must be divisors of Ni
in the interval [0,1].
Confidence bands are truncated in a similar way as in "PSN" method in order not to have bands lower than 0 or higher than 1.
Demidenko methodology  "DEK" method
Demidenko ROC curve estimate does not correspond to the empirical one due to the fact that the (bio)marker values in controls and cases are supposed to come from a normal distribution is exploited.
A list of class 'rocbands' with the following content:
method 
method used to compute the confidence bands. One of "PSN" (MartinezCamblor 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 
practical.area 
area between lower and upper bands ( 
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 
fixed.alpha1 
if TRUE, 
c1, c2 
c_{α_1} and c_{α_2} resulting from the algorithm to compute confidence bands. 
ROC.B 
matrix of size 
sd.PSN 
vector σ_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 ( 
smoothROC.p 
smooth ROC curve estimate for each value of 
K.alpha 
value of K_{a,b}^α computed to calculate confidence bands (see Details above). 
var.JMS 
value of Var(Ψ(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. 
Brownian bridges needed to estimate Ψ(.) 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 nonparametric, 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 rightsided ROC curve. If side
is left
or both
only the "PSN" method provides confidence bands.
MartinezCamblor P., PerezFernandez S., Corral N., 2016, Efficient nonparametric confidence bands for receiver operatingcharacteristic curves, Statistical Methods in Medical Research, DOI: 10.1177/0962280216672490.
Jensen K., Muller HH., Schafer H., 2000, Regional confidence bands for ROC curves, Statistical in Medicine, 19, 493509.
Demidenko E., 2012, Confidence intervals and bands for the binormal ROC curve, Journal of Applied Statistics, 39(1), 6779.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  # 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)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.