Learn R Programming

movieROC (version 0.1.1)

predict: Predict the classification regions for a particular specificity

Description

This function prints the classification subsets corresponding to a particular false-positive rate FPR or to cutoff value(s) C or XL, XU introduced by the user.

Usage

# S3 method for groc
predict(object, FPR = NULL, C = NULL, XL = NULL, XU = NULL, ...)
# S3 method for hroc
predict(object, FPR = 0.15, ...)

Value

A list of length 3 with the following fields:

ClassSubsets

A matrix with the classification region. Number of rows indicate the number of intervals whose union defines the classification region.

Specificity

Resulting specificity value.

Sensitivity

Resulting sensitivity value.

Arguments

object

An object of class ‘groc’ or ‘hroc’.

FPR

False-positive rate used to predict the classification region. Default: 0.15 if no cutoff value is provided by the next input parameters.

C

Cutoff value used to predict the classification region for ‘groc’ object with side = "right" or "left". If FPR is provided, C is not used. Default: none.

XL, XU

Cutoff values used to predict the classification region for ‘groc’ object with side = "both" or "both2". If FPR is provided, C is not used. Default: none.

...

Other parameters to be passed. Not used.

Examples

Run this code
data(HCC)

roc <- gROC(X = HCC$cg18384097, D = HCC$tumor) # Right-sided ROC curve
predict(roc, FPR = 0.5)
groc <- gROC(X = HCC$cg18384097, D = HCC$tumor, side = "both") # gROC curve
predict(groc, FPR = 0.5)
hroc_cg18384097 <- hROC(X = HCC$cg18384097, D = HCC$tumor, 
    formula.lrm = "D ~ rcs(X,8)") 
predict(hroc_cg18384097, FPR = 0.5)

Run the code above in your browser using DataLab