Aliases for individual desirability functions
Usage
maximize(x, low, high, scale = 1, missing = NA_real_, use_data = FALSE)
minimize(x, low, high, scale = 1, missing = NA_real_, use_data = FALSE)
target(
x,
low,
target,
high,
scale_low = 1,
scale_high = 1,
missing = NA_real_,
use_data = FALSE
)
constrain(x, low, high, missing = NA_real_, use_data = FALSE)
category(x, categories, missing = NA_real_)Arguments
- x
A vector of data to compute the desirability function
- low, high, target
Single numeric values that define the active ranges of desirability.
- scale, scale_low, scale_high
A single numeric value to rescale the desirability function (each should be great than 0.0). Values >1.0 make the desirability more difficult to satisfy while smaller values make it easier (see the examples below).
scale_lowandscale_highdo the same for target functions withscale_lowaffecting the range below thetargetvalue andscale_highaffecting values greater thantarget.- missing
A single numeric value on
[0, 1](orNA_real_) that defines how missing values inxare mapped to the desirability score.- use_data
Should the low, middle, and/or high values be derived from the data (
x) using the minimum, maximum, or median (respectively)?- categories
A named vector of desirability values that match all possible categories to specific desirability values. Data that are not included in
categoriesare given the value inmissing.