findROC: Compute the area under the ROC curve

Description Usage Arguments Value See Also Examples

View source: R/add.r

Description

This function computes the numeric value of area under the ROC curve (AUC) with the trapezoidal rule. It is a wrapper function around the pRoc function in the roc package

Usage

1
findROC(Data, coeff)

Arguments

Data

a data matrix; in the first column there should be the binary response variable y. If you give the training dataset it will calculate the in-sample AUC. If supplied with a new dataset then it will return the predictive AUC.

coeff

vector of coefficients

Value

The area under the ROC curve, the sensitivity and specificity

See Also

roc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(14)
beta    <- c(3, 2, -1.6, -4)
noise   <- 5
simData <- SimData(N=100,beta=beta, noise=noise, corr=FALSE)

stepPenal<- StepPenal(Data=simData, lamda=1.2, w=0.7)

(coeffP <- stepPenal$coeffP)

findROC(simData, coeff=coeffP)

stepPenal documentation built on May 29, 2017, 3:25 p.m.

Related to findROC in stepPenal...