ROC: Estimation of the traditional ROC curves (without censoring)

Description Usage Arguments Details Value Author(s) Examples

Description

This function performs estimations of ROC curves (without censoring) according to quantitative marker and a binary outcome.

Usage

1
ROC(status, marker, cut.values)

Arguments

status

A numeric vector with the indicators of the disease (e.g. 0=disease-free, 1=disease).

marker

A numeric vector with the values of the quantitative marker.

cut.values

The threshold values of the marker for which the coordinates of the ROC are computed.

Details

This function computes a traditional ROC curve (without right-censoring). The false positive and negative rates are obtained by estimating the corresponding proportion

Value

The function returns a list. cut.values is the vector of the input threshold values. TP and FP represent the corresponding false and true positive rates. AUC is the area under the curve.

Author(s)

Y. Foucher <Yohann.Foucher@univ-nantes.fr>

Examples

1
2
3
4
5
6
7
8
# import and attach the data example

X <- c(1, 2, 3, 4, 5, 6, 7, 8) # The value of the marker
Y <- c(0, 0, 0, 1, 0, 1, 1, 1) # The value of the binary outcome

ROC.obj <- ROC(status=Y, marker=X, cut.values=sort(X))
plot(ROC.obj$FP, ROC.obj$TP, ylab="True Positive Rates",
 xlab="False Positive Rates", type="s", lwd=2)

ROC632 documentation built on May 2, 2019, 3:41 p.m.