roc: To Get the Best Cutoff Value for ROC Curve

Description Usage Arguments Value Examples

View source: R/roc.R

Description

Youden index is used for seeking the best cutoff value for ROC Curve.

Usage

1
roc(score, class)

Arguments

score

continuous value

class

bianary value, 0 and 1

Value

If the auc of a variate is lower than 0.5, we treat it as negative classification and return information about the negative prediction. Otherwise, The variate will be treated as positive one.

Examples

1
2
roc(score = mtcars$qsec,class = mtcars$am)
roc(score = mtcars$drat,class = mtcars$am)

Example output

                     type  auc cutoff sensitivity specificity
1 negative classification 0.62  17.05   0.5384615   0.7894737
                     type auc cutoff sensitivity specificity
1 positive classification 0.9   3.77   0.8461538   0.8421053

cutoff documentation built on Jan. 11, 2020, 9:39 a.m.

Related to roc in cutoff...