# NOT RUN {
opt_cut <- cutpointr(suicide, dsi, suicide)
plot_roc(opt_cut, display_cutpoint = FALSE)
opt_cut_2groups <- cutpointr(suicide, dsi, suicide, gender)
plot_roc(opt_cut_2groups, display_cutpoint = TRUE)
roc_curve <- roc(suicide, x = dsi, class = suicide, pos_class = "yes",
neg_class = "no", direction = ">=")
plot(roc_curve)
auc(roc_curve)
# }
Run the code above in your browser using DataLab