Arguments

x

for rocinfo and rocauc, a vector of probabilities, or an object of class mixmod or mdmixmod; for multiroc, a list of objects suitable to be passed as arguments to rocinfo; for plotting methods, an object of the appropriate class.

labels

a vector of logical values of the same length as the probabilities, in which a value of TRUE indicates a true positive; for multiroc, optionally a list of such vectors of the same length, with the same element names, as x.

quasi

logical; if TRUE, the x-axis of the ROC curve denotes the total positive rate rather than the false positive rate.

legend

character or FALSE; if character, a legend will be drawn with the name(s) in legend; if FALSE, no legend will be drawn.

cex.legend

magnification to be used for legend text.

auc

logical; if TRUE, AUC, or Area Under the Curve, will be shown in the legend. Larger AUC indicates better performance. No effect if legend is FALSE.

dca

logical; if TRUE, DCA, or Distance of Closest Approach of the curve to (0,1), will be shown in the legend. Smaller DCA indicates better performance. No effect if legend is FALSE.

bw

logical; if TRUE, a black-and-white version of the plot will be drawn. Convenience function for drawing multiple ROC curves on the same plot.

col, lty, lwd, ylab, xlab

as the equivalent arguments to plot.default or lines.default. For plot.multiroc, col, lty, and lwd should be vectors of the same length as x.

grid

logical; if TRUE, draw a grid on the plot.

gridres, gridcol, gridlty

resolution, color, and line type for the grid. No effect if grid is FALSE.

...

further arguments to plot.default or lines.default for the plotting methods, no effect for the other functions.

Details

rocinfo calculates the ROC curve x coordinates (false positive rate, or all positive rate if quasi is TRUE), y coordinates (true positive rate), AUC, and DCA for the given probabilities and labels. multiroc performs the same function for multiple probabilities, and optionally multiple labels.

Value

For rocinfo, a list of class rocinfo having the following elements:

tpr

the true positive rate in ascending order of the probabilities.

fpr

the false positive rate in ascending order of the probabilities.

apr

the all positive rate in ascending order of the probabilities.

auc

the Area Under the Curve.

dca

the Distance of Closest Approach.

quasi

logical; the same as the argument to rocinfo.

For rocauc, the numerical value of the AUC.

For multiroc, a list of class multiroc having elements of class rocinfo.