# Computing by hand the optimal threshold value for a biomarker using the Youden Index

I have an empirical estimate of a ROC curve, that is, a plot of the sensitivity versus 1-specificity over all possible cut-off values of the marker. Based on an empirical ROC curve, I would like to determine the optimal cut-off point that represents a better trade-off between sensitivity and specificity. I have read that the Youden Index can be used in that purpose.

Here is an example:

oneMinusSpecificity <- c(1.00000000,
0.636363636,
0.436363636,
0.315151515,
0.163636364,
0.096969697,
0.072727273,
0.006060606,
0.000000000)
sensitivity <- c(1.00000000,
0.91566265,
0.77108434,
0.66265060,
0.39759036,
0.33734940,
0.28915663,
0.07228916,
0.00000000)


which results in the following ROC curve. The vertical line represents the Youden index = largest distance between "1 - specificity" and "sensitivity".

I find

> youden <- max(sensitivity - oneMinusSpecificity)
> youden
[1] 0.3474991


How can I calculate the optimal cut-off using this information?

• Please note that you are also in a gray zone of this site's scope; this seems like an R programming Q which might be asked on StackOverflow. Anyway, it would be easier to answer if you would make it reproducible, i.e. add information how you have calculated sensitivity and oneMinusSpecificity from the decision and raw biomarker level. – user88 May 13 '13 at 15:52