gROC {movieROC}R Documentation

Build a ROC curve for a univariate marker

Description

This is one of the main functions of the movieROC package. It builds a univariate ROC curve (standard or general) and returns a ‘groc’ object, a list of class ‘groc’. This object can be printed, plotted, or predicted for a particular point. It may be also passed to other functions: plot_regions(), plot_buildROC(), movieROC(), plot_densities(), and plot_densityROC().

Usage

gROC(X, D, ...)
## Default S3 method:
gROC(X, D, side = c("right", "left", "both", "both2"),
    restric = FALSE, optim = TRUE, t0 = NULL, t0max = FALSE, verbose = FALSE, ...)

Arguments

X

Vector of marker values.

D

Vector of response values. Two levels; if more, the two first ones are used.

side

Type of ROC curve. One of "right" (\mathcal{R}_r(\cdot)), "left" (\mathcal{R}_l(\cdot)), "both" (\mathcal{R}_g(\cdot)) or "both2" (\mathcal{R}_{g'}(\cdot)). Default: "right".

restric

If TRUE, the gROC curve with restriction (C) is computed. Default: FALSE.

optim

If TRUE (and restric = TRUE), the computation of the optimal gROC curve under restriction (C) is performed by using Floyd's algorithm (Floyd, 1962), implemented in the allShortestPaths() function in the e1071 package. Default: TRUE.

t0

An integer number between 1 and m+1 (where m is the negative sample size). If restric = TRUE, the restricted gROC curve is computed departing from (t0-1)/m. Default: the one reporting the Youden index.

t0max

If TRUE, the computation of the gROC curve under restriction (C) is performed departing from every possible t0 and the one reporting the maximum AUC is selected.

verbose

If TRUE, a progress bar is displayed for computationally intensive methods. Default: FALSE.

...

Other parameters to be passed. Not used.

Details

This function's main job is to estimate an ROC curve for a univariate marker under one of these considerations: larger values of the marker are associated with a higher probability of being positive (resulting in the right-sided ROC curve, \mathcal{R}_r (\cdot)), the opposite (left-sided ROC curve, \mathcal{R}_l (\cdot)), when both smaller and larger values of the marker are associated with having more probability of being positive (gROC curve, \mathcal{R}_g(\cdot)), the opposite (opposite gROC curve, \mathcal{R}_{g'}(\cdot)).

Value

A list of class ‘groc’ with the following fields:

controls, cases

Marker values of negative and positive subjects, respectively.

levels

Levels of response values.

side

Type of ROC curve.

t

Vector of false-positive rates.

roc

Vector of values of the ROC curve for t.

c

Vector of marker thresholds resulting in (t, roc) if side = "right" | "left".

xl, xu

Vectors of marker thresholds resulting in (t, roc) if side = "both" | "both2".

auc

Area under the curve estimate.

aucfree

Area under the curve estimate without restrictions.

aucs

Area under the curve with restriction (C) departing from every false-positive rate, FPR \in \{ 0, 1/m, \dots, 1 \}.

Dependencies

If side = "both" and optim = TRUE, the allShortesPaths() function in the e1071 package is used. Also the combinations() function in gtools and %[]% in intrval.

References

P. Martínez-Camblor, N. Corral, C. Rey, J. Pascual, and E. Cernuda-Morollón (2017) “Receiver operating characteristic curve generalization for non-monotone relationships”. Statistical Methods in Medical Research, 26(1):113–123. DOI: doi:10.1177/0962280214541095.

S. Pérez-Fernández, P. Martínez-Camblor, P. Filzmoser, and N. Corral (2021). “Visualizing the decision rules behind the ROC curves: understanding the classification process”. AStA Advances in Statistical Analysis, 105(1):135-161. DOI: doi:10.1007/s10182-020-00385-2.

R. W. Floyd (1962) “Algorithm 97: Shortest path”. Communications of the ACM, 5: 345–345. DOI: doi:10.1145/367766.368168.

Examples

data(HCC)

# ROC curve estimates for gene 03515901 and response tumor
gROC(X = HCC[,"cg03515901"], D = HCC$tumor) # Standard right-sided ROC curve
gROC(X = HCC[,"cg03515901"], D = HCC$tumor, side = "left") # Left-sided ROC curve
gROC(X = HCC[,"cg03515901"], D = HCC$tumor, side = "both") # gROC curve without restrictions


### Warning: Next line of code is time consuming. gROC curve with restriction (C)
gROC(X = HCC[,"cg03515901"], D = HCC$tumor, side = "both", restric = TRUE)


[Package movieROC version 0.1.1 Index]