auroc: Calculate the area under the ROC curve

View source: R/yr2.R

aurocR Documentation

Calculate the area under the ROC curve

Description

Calculate the area under the ROC curve

Usage

auroc(yr2)

Arguments

yr2

the yogiroc2 object

Value

a numerical vector with the AUROC for each predictor

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)
#calculate AUROC
auroc(yrobj)

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