plot.rocci: Plot ROC Curve with confidence limits

View source: R/plot_ciROC.R

plot.rocciR Documentation

Plot ROC Curve with confidence limits

Description

This function plots receiver operating characteristic (ROC) curve with confidence limits. This is an S3 method for object of class "rocci", returned by ciROC.rocit function.

Usage

## S3 method for class 'rocci'
plot(
  x,
  col = c("#2F4F4F", "#404040"),
  lty = c(1, 2),
  lwd = c(2, 1),
  grid = TRUE,
  legend = TRUE,
  legendpos = "bottomright",
  ... = NULL
)

Arguments

x

An object of class "rocci", returned by ciROC.rocit function.

col

Color(s) to be used for the plot. First two colors are used for the ROC curve and confidence limits if multiple colors supplied. Same color is used if single color supplied.

lty

The line type. Same as in par. First two or one are used (like col) depending on the length of lty.

lwd

The line width. Same as in par. First two or one are used (like col) depending on the length of lwd.

grid

Logical, indicating whether to add rectangular grid. Calls grid with default settings.

legend

Logical, indicating whether to add legends to the plot.

legendpos

Position of the legend. A single keyword from "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center", as in legend. Ignored if legend is FALSE.

...

NULL. Used for S3 generic/method consistency.

See Also

ciROC, rocit, plot.rocit

Examples

score <- c(rnorm(300,30,15), rnorm(300,50,15))
class <- c(rep(0,300), rep(1,300))
rocit_object <- rocit(score = score, class = class, method = "bi")
rocci_object <- ciROC(rocit_object)
# ---------------------------
plot(rocci_object)
plot(rocci_object, col = c(2,4))
plot(rocci_object, col = c(2,4), legendpos = "bottom", lty = c(1,3))



ROCit documentation built on May 29, 2024, 2:15 a.m.