np.auROCc: Area under the receiver operating characteristic (ROC) curve

Description Usage Arguments Value See Also Examples

View source: R/np.auROCc.R

Description

np.auROCc estimates the non-parametric (trapezoidal) area under the ROC curve (also known as Mann-Whitney statistic), its standard error and confidence interval (by DeLong method). Its confidence interval has the purpose to test if the AUC is different from 0.5 (the auc null hypothesis value). It is not appropriate to use this confidence interval to compare with other auc due to lack of adjustment of possible correlation.

Usage

1
np.auROCc(ref, test, CL = 0.95, reverse = "auto")

Arguments

ref

The reference standard. A column in a data frame or a vector indicating the classification by the reference test. The reference standard must be coded either as 0 (absence of the condition) or 1 (presence of the condition)

test

The index test or test under evaluation. A column in a dataset or vector indicating the test results in a continuous scale.

CL

Confidence limit. The limits of the confidence interval. Must be coded as a number in a range from 0 to 1. Default value is 0.95

reverse

"auto" (default), TRUE or FALSE are the acceptable values. ROC analysis assumes that higher values of the test are from subjects with the condition, and lower values are from subjects without the condition. If it occurs the other way around, the ROC analysis and its interpretation must be reversed. If "auto", np.auROCc internally checks if the auc is below 0.5. If this is the case, it returns a warning and makes the reversion as 1 - auc.

Value

AUC The area under the ROC curve.

AUC.SE The area under the ROC curve standard error.

AUC.lower.CL The area under the ROC curve lower confidence limit.

AUC.upper.CL The area under the ROC curve lower confidence limit.

See Also

SS, TGROC

Examples

1
2
3
4
5
6
7
8
9
data("tutorial")

# The reference standard is not coded correctly
np.auROCc(ref = ifelse(tutorial$Gold == "pos", 1, 0), test = tutorial$Test_B)

# Artificially reversing the test to see the function reversing automatically
np.auROCc(ref = ifelse(tutorial$Gold == "pos", 0, 1), test = tutorial$Test_B)

rm(tutorial)

DiagnosisMed documentation built on May 2, 2019, 5:21 p.m.