Area Under the Curve (AUC)

auc(pred, rvar, lev)

Arguments

pred

Prediction or predictor

rvar

Response variable

lev

The level in the response variable defined as success

Value

AUC statistic

Details

See https://radiant-rstats.github.io/docs/model/evalbin.html for an example in Radiant

See also

evalbin to calculate results

summary.evalbin to summarize results

plot.evalbin to plot results

Examples

auc(runif(20000), dvd$buy, "yes")
#> [1] 0.5040667
auc(ifelse(dvd$buy == "yes", 1, 0), dvd$buy, "yes")
#> [1] 1