plot.rocci: Plot ROC Curve with confidence limits

Description Usage Arguments See Also Examples

View source: R/plot_ciROC.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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

1
2
3
4
5
6
7
8
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 July 1, 2020, 11:28 p.m.