Description Usage Arguments Details Value Author(s) Examples
This function performs estimations of ROC curves (without censoring) according to quantitative marker and a binary outcome.
1 | ROC(status, marker, cut.values)
|
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. |
This function computes a traditional ROC curve (without right-censoring). The false positive and negative rates are obtained by estimating the corresponding proportion
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.
Y. Foucher <Yohann.Foucher@univ-nantes.fr>
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.