pred.result: Calculate sensitivity, specitifity, accuracy and AUC of the...

Description Usage Arguments Value Author(s) Examples

View source: R/iroc.R

Description

Calculate sensitivity, specitifity, accuracy and AUC of the ROC. And the 0.95 CI of AUC were calculated by DeLong's method.

Usage

1
pred.result(testy, yhat)

Arguments

testy

A vector containing the true class labels.

yhat

A numeric vector containing prediction probabilities.

Value

result A list of sensitivity, specifity, accuracy, AUC and 0.95 CI of AUC.

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)
#Calculate the sensitivity, specifity, accuracy in topleft of the ROC curve
#Calculate AUC and 0.95 CI of AUC.
pred.result(testy,yhat)

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