Learn R Programming

pROC (version 1.8)

lines.roc: Add a ROC line to a ROC plot

Description

This convenience function adds a ROC line to a ROC curve.

Usage

"lines"(x, ...) "lines"(x, ...) "lines.roc"(x, lwd=2, ...) "lines.roc"(x, data, ...) "lines.roc"(x, predictor, ...) "lines.roc"(x, ...)

Arguments

x
a roc object from the roc function (for plot.roc.roc), a formula (for plot.roc.formula) or a response vector (for plot.roc.default).
predictor, data
arguments for the roc function.
lwd
line width (see par).
...
graphical parameters for lines, and especially type (see plot.default) and arguments for par such as col (color), lty (line type) or line characteristics lend, ljoin and lmitre.

Value

This function returns a list of class “roc” invisibly. See roc for more details.

See Also

roc, plot.roc

Examples

Run this code
data(aSAH)

rocobj <- plot.roc(aSAH$outcome, aSAH$s100b, type="n")
lines(rocobj, type="b", pch=21, col="blue", bg="grey")

# Without using 'lines':
rocobj <- plot.roc(aSAH$outcome, aSAH$s100b, type="b", pch=21, col="blue", bg="grey")

Run the code above in your browser using DataLab