cutscores {ROCpsych}R Documentation

Function to compute optimal cut-off scores

Description

This function computes the optimal cut-off scores based on sensitivity, specificity, and the Youden Index (Youden, 1950) <doi:10.1002/1097-0142(1950)3:1<32::AID-CNCR2820030106>3.0.CO;2-3>.

Usage

cutscores(outcome, predictor)

Arguments

outcome

The outcome variable indicating the status in the form of a data frame or matrix. This variable is typically coded as 0 (positive) and 1 (negative).

predictor

A numerical vector of scores used to predict the status of the outcome. This variable should be of the same length as the outcome variable (i.e., two variables are from the same data set and also of the same number of data rows).

Value

A list of two objects: (1) summary statistics of selected cut scores, and (2) detailed information of each used cut score and corresponding classification statistics.

Summary

Summary statistics of selected cut scores. Specifically,
* Cut.off, the select cut-off scores according to different criteria
* SEN, Sensitivity, also true positive rate, the y-axis of the ROC.
* SPE, Specificity, also true negative rate.
* 1-SPE, the x-axis of the ROC.
* Youden.Index.
* TP, true positives.
* FP, false positives.
* FN, false negatives.
* TN, true negatives.

Details

Detailed information of each used cut score and corresponding classification statistics.

References

Youden, W.J. (1950). "Index for rating diagnostic tests." Cancer,3, 32-35. doi:10.1002/1097-0142(1950)3:1<32::AID-CNCR2820030106>3.0.CO;2-3.

Examples

 
#read the example data
data(ROC.data.ex)
#run the function
result<-cutscores(ROC.data.ex$outcome, ROC.data.ex$predictor)
#obtain results
result$Summary
result$Details 

[Package ROCpsych version 1.3 Index]