BestCut | R Documentation |
Returns the best cutpoint for a given classification model.
BestCut(x, method = c("youden", "closest.topleft"))
x |
a roc object from the roc function |
method |
one of |
The method
argument controls how the
optimal threshold is determined.
youden
'Youden's J statistic (Youden, 1950) is employed. The optimal cut-off is the threshold that maximizes the distance to the identity (diagonal) line. Can be shortened to “y”.
The optimality criterion is:
max(sensitivities + specificities)
closest.topleft
'The optimal threshold is the point closest to the top-left part of the plot with perfect sensitivity or specificity. Can be shortened to “c” or “t”.
The optimality criterion is:
min((1 - sensitivities)^2 + (1- specificities)^2)
the threshold value
Robin Xavier <pROC-cran@xavier.robin.name>, Andri Signorell <andri@signorell.net> (interface)
Xavier Robin, Natacha Turck, Alexandre Hainard, et al. (2011) “pROC: an open-source package for R and S+ to analyze and compare ROC curves”. BMC Bioinformatics, 7, 77. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1471-2105-12-77")}.
ROC
r.glm <- FitMod(diabetes ~ ., data = d.pima, fitfn="logit")
ROC(r.glm)
BestCut(ROC(r.glm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.