iroc: Plot the ROC curve

Description Usage Arguments Value Author(s) Examples

View source: R/iroc.R

Description

Plot the ROC curve and show the AUC of ROC. The 0.95 CI of AUC were calculated by DeLong's method.

Usage

1
iroc(testy, yhat)

Arguments

testy

A vector containing the true class labels.

yhat

A numeric vector containing prediction probabilities.

Value

Figure of the ROC curve.

Author(s)

Yi Li, liyistat@gmail.com

Examples

1
2
3
4
5
6
7
#Simulate true prediction labels
testy<-rep(c(0,1),500)
#Simulate prediction probabilities
yhat<-runif(1000, min = 0, max = 1)
#Plot the ROC curve and show the AUC and its CI
#Print the prediction performance of the topleft point
iroc(testy, yhat)

liyistat/iroc documentation built on May 21, 2019, 7:33 a.m.