I would like to make a ROC curve and identify the Youden-Index. I have a subsample as below. Where I need to find cut point for the column "val" based on the reference column "ref". How can I make the ROC plot, identifying the cutoff with specificities and sensitivities as well as Youden Index, in Stata or R?
cut_= structure(list(val = c("2.5", "3.5", "1.5", "1.1", "2.4", "1.6",
"1.9", "2.7", "1.2", "1.5", "2.1", "1.4", "1.8", "3.5", "2.5",
"2.4"), ref = c(1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0,
1)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-16L))
