oc_mean {cutpointr} | R Documentation |
The sample mean is calculated and returned as the optimal cutpoint.
oc_mean(data, x, trim = 0, ...)
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. |
trim |
The fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint. |
... |
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. |
Other method functions:
maximize_boot_metric()
,
maximize_gam_metric()
,
maximize_loess_metric()
,
maximize_metric()
,
maximize_spline_metric()
,
oc_manual()
,
oc_median()
,
oc_youden_kernel()
,
oc_youden_normal()
data(suicide)
oc_mean(suicide, "dsi")
cutpointr(suicide, dsi, suicide, method = oc_mean)