uroc: Computes a UROC curve.

View source: R/uroc.R

urocR Documentation

Computes a UROC curve.

Description

This function builds a UROC curve and returns a "uroc" object, a list of class "uroc".

Usage

uroc(response, predictor, approx = FALSE, split = 1)

Arguments

response

a numeric vector of real valued responses.

predictor

a numeric vector of the same length than response, containing real valued predictions for each observation.

approx

Boolean. If TRUE approximates true roc curve with faster algorithm.

split

integer value with a default of split = 1. Computes uroc curve by considering only a subset of all N-1 available ROC curves to reduce computation time. The split parameter defines the distance between a set of equidistant indices which are then used to select particular ROC curves among the N-1.

Details

The default option to compute uroc curve generates an approximation to the UROC curve by using linear interpolation of each ROC curve. For small datasets or binary response the exact uroc curve is computed. Setting option approx = TRUE uses a faster approximation algorithm where computation time can be further reduced by setting the paramter split which selects only a subset of ROC curves in the computation.

Value

If object = TRUE this function returns a list of class "uroc".

Examples

data(longley)
response = longley$Employed
predictor = longley$GNP
uroc(response, predictor)

evwalz/uroc documentation built on May 22, 2022, 1:40 a.m.