Learn R Programming

fbroc (version 0.4.1)

extract.roc: Extracts one from two paired ROC curves from a fbroc.paired.roc object

Description

Given paired ROC curves it can be helpful to look at them in isolation as well. This functions allows the extraction of one of the paired ROC curves as a fbroc.roc object without recalculating the ROC curve.

Usage

extract.roc(x, index)

Arguments

x

Object of class fbroc.paired.roc.

index

A number specifying which of the two ROC curves should be returned. Needs to be 1 or 2.

Value

An object of class fbroc.roc containing all data about the requested ROC curve

See Also

boot.paired.roc

Examples

Run this code
# NOT RUN {
data(roc.examples)
example <- boot.paired.roc(roc.examples$Cont.Pred, roc.examples$Cont.Pred.Outlier, 
                           roc.examples$True.Class, n.boot = 100)
roc1 <- extract.roc(example, 1)
roc1.equivalent <- boot.roc(roc.examples$Cont.Pred, roc.examples$True.Class, 
                            n.boot = 100)
print(identical(roc1, roc1.equivalent)) # roc1 and roc1.equivalent will be the same
# This does not hold when use.cache = TRUE. See the note above.
# }

Run the code above in your browser using DataLab