metric_constrain: Metrics that are constrained by another metric
Description
For example, calculate sensitivity where
a lower bound (minimal desired value) for specificty can be defined. All returned
metric values for cutpoints that lead to values of the constraining metric
below the specified minimum will be zero.
The inputs must be vectors of equal length.
# NOT RUN {## Maximum sensitivity when specificity is at least 95%cp <- cutpointr(suicide, dsi, suicide,
metric = sens_constrain, constrain_metric = ppv, min_constrain = 0.75)
plot_metric(cp)
# }