For a receiver operating characteristic (ROC) curve, the
Youden statistic is the maximum vertical deviation between the curve
and the diagonal line \(y=x\).
Suppose \(R(p)\) denotes the ROC curve as a function of the
horizontal coordinate \(p\).
If sign="positive"
(the default), deviation is defined as the
positive part \(\max(0, R(p)-p)\).
If sign="absolute"
, deviation is defined as the
absolute value \(| R(p) - p|\).
If sign="negative"
, deviation is defined as the
negative part \(\max(0, p - R(p))\).
The maximum deviation over all values of \(p\) is determined.
The result is always nonnegative.