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 print
ed, plot
ted, or predict
ed
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 |
restric |
If TRUE, the gROC curve with restriction (C) is computed. Default: FALSE. |
optim |
If TRUE (and |
t0 |
An integer number between 1 and |
t0max |
If TRUE, the computation of the gROC curve under restriction (C) is performed
departing from every possible |
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, ), the opposite (left-sided ROC curve,
), when both smaller and larger values of the marker are
associated with having more probability of being positive (gROC curve,
), the opposite (opposite gROC curve,
).
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 |
c |
Vector of marker thresholds resulting in ( |
xl , xu |
Vectors of marker thresholds resulting in ( |
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, |
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)