draw.roc: Draw a ROC curve

View source: R/yr2.R

draw.rocR Documentation

Draw a ROC curve

Description

Draw a ROC curve

Usage

draw.roc(yr2, col = seq_along(yr2), lty = 1, legend = "bottomright", ...)

Arguments

yr2

an underlying yogiroc2 object

col

the colors to use for the predictors

legend

the positioning of the legend (e.g. "bottomright). NA to disable legend.

...

additional graphical parameters (see par)

Value

nothing, draws a plot

Examples

#generate fake data
truth <- c(rep(TRUE,10),rep(FALSE,8))
scores <- cbind(
  pred1=c(rnorm(10,1,0.2),rnorm(8,.9,0.1)),
  pred2=c(rnorm(10,1.1,0.2),rnorm(8,.9,0.2))
)
#create yogiroc2 object
yrobj <- yr2(truth,scores)
#draw PRC curve
draw.roc(yrobj)

jweile/yogiroc documentation built on Jan. 15, 2024, 2:47 a.m.