oc_youden_normal {cutpointr} | R Documentation |
Determine an optimal cutpoint for the Youden-Index assuming normal distributions
Description
An optimal cutpoint maximizing the Youden- or J-Index (sensitivity + specificity - 1) is calculated parametrically assuming normal distributions per class.
Usage
oc_youden_normal(
data,
x,
class,
pos_class = NULL,
neg_class = NULL,
direction,
...
)
Arguments
data |
A data frame or tibble in which the columns that are given in x and class can be found. |
x |
(character) The variable name to be used for classification, e.g. predictions or test values. |
class |
(character) The variable name indicating class membership. |
pos_class |
The value of class that indicates the positive class. |
neg_class |
The value of class that indicates the negative class. |
direction |
(character) Use ">=" or "<=" to select whether an x value >= or <= the cutoff predicts the positive class. |
... |
To capture further arguments that are always passed to the method function by cutpointr. The cutpointr function passes data, x, class, metric_func, direction, pos_class and neg_class to the method function. |
See Also
Other method functions:
maximize_boot_metric()
,
maximize_gam_metric()
,
maximize_loess_metric()
,
maximize_metric()
,
maximize_spline_metric()
,
oc_manual()
,
oc_mean()
,
oc_median()
,
oc_youden_kernel()
Examples
data(suicide)
oc_youden_normal(suicide, "dsi", "suicide",
pos_class = "yes", neg_class = "no", direction = ">=")
cutpointr(suicide, dsi, suicide, method = oc_youden_normal)