Description Usage Arguments Details Value References See Also Examples
Computes the ROC curve (nonparametric or parametric based on likelihood) for single populations or a weighted ROC curve for lists of populations. The MAMSE weights are used by default for the multiple populations case.
1 2 |
healthy |
A single numeric vector with the values of the diagnostic variable for the healthy group, or a list of |
diseased |
A single numeric vector with the values of the diagnostic variable for the diseased group, or a list of |
wh |
Weights for the healthy population. If healthy is a vector, |
wd |
Weights for the diseased population. If healthy is a vector, |
FPR |
Numeric vector giving the values of |
method |
Allowed values are |
smalldiseased |
By default, it is assumed that diseased subjects tend to have smaller values than healthy ones, but |
AUC |
If |
nFPR |
If |
This function returns the ROC curve based on the provided data sets. The method can be either parametric (normal or log-normal) or nonparametric. Multiple samples can be used and weighted. MAMSE weights are used by default. The first sample appearing in the lists of data is then deemed to come from the population of interest. The function returns a list of point (FPR,TPR) that can be plotted to see the ROC curve. The points where the function is evaluated can be controlled by specifying FPR manually. By default, it is assumed that small values of the diagnostic variable indicate a disease, but the option smalldiseased
can be used if small values are for healthy subjects.
S3 object of type roc
which is a list with the values TPR (vector with true positive rates for different thresholds), FPR (false positive rate for the corresponding threshold) and AUC (Area under the ROC curve). A method for plot has been defined for easier display (see exemples below).
J.-B. Débordès & J.-F. Plante (2009). Combining ROC curves using MAMSE weighted distributions. Cahier du GERAD G-2015-69.
MAMSE-package, MAMSE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(Progesterone)
healthy=lapply(Progesterone,function(x){x$viable})
diseased=lapply(Progesterone,function(x){sort(c(x$ecto,x$abort))})
par(mfrow=c(2,2))
plot(roc(healthy[[1]],diseased[[1]],AUC=TRUE))
title("Empirical ROC curve based on Ledger (1994)")
plot(roc(healthy[[1]],diseased[[1]],AUC=TRUE,method="lognormal"))
title("Parametric ROC curve based on Ledger (1994)")
plot(roc(healthy,diseased,AUC=TRUE))
title("MAMSE-weighted empirical ROC curve")
plot(roc(healthy,diseased,AUC=TRUE,method="lognormal"))
title("MAMSE-weighted parametric ROC curve")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.