Get optimal threshold with at least 75% sensitivity with pROC in R
Option 1: you filter the results
my.coords <- coords(roc=roc_curve, x = "all", transpose = FALSE)
my.coords[my.coords$sensitivity >= .75, ]
Option 2: you can trick pROC
by requesting a partial AUC between 75% and 100% of sensitivity:
roc_curve = roc(truth1 ~ score1 , data = my_data, partial.auc = c(1, .75), partial.auc.focus="sensitivity")
All of pROC's methods will follow this request and give you results only in this area of interest:
coords(roc=roc_curve, x = "local maximas", ret='threshold', transpose = FALSE)