Learn R Programming

asbio (version 1.9-2)

auc: Area under a receiver operating characteristic (ROC) curve

Description

A simple algorithm for calculating AUC.

Usage

auc(obs, fit, plot = FALSE)

Arguments

obs

Dichotomous 0, 1 outcomes (i.e. response values for binomial GLM).

fit

Fitted probabilities from some model.

plot

Logical, indicating whether or not ROC curve plot should be created.

Author

Ken Aho

References

Agresti, A. (2012) Categorical Data Analysis, 3rd edition. New York. Wiley.

Examples

Run this code
if (FALSE) {
obs <-rbinom(30, 1, 0.5)
fit <- rbeta(30, 1, 2)
auc(obs, fit)}

Run the code above in your browser using DataLab