This function calculates the desirability for each response as well as the overall desirability. The resulting data.frame can be used to plot the overall desirability as well as the desirabilities for each response. This function is designed to visualize the desirability approach for multiple response optimization.
Arguments
- fdo
An object of class
facDesign.ccontainingfitsanddesires.- steps
A numeric value indicating the number of points per factor to be evaluated, which also specifies the grid size. Default is `20`.
- constraints
A list of constraints for the factors in coded values, such as
list(A > 0.5, B < 0.2).- ...
Further arguments passed to other methods.
Value
A data.frame with a column for each factor, the desirability for each response, and a column for the overall desirability.
Examples
#Example 1: Arbitrary example with random data
rsdo = rsmDesign(k = 2, blocks = 2, alpha = "both")
rsdo$.response(data.frame(y = rnorm(rsdo$nrow()), y2 = rnorm(rsdo$nrow())))
rsdo$set.fits(rsdo$lm(y ~ A*B + I(A^2) + I(B^2)))
rsdo$set.fits(rsdo$lm(y2 ~ A*B + I(A^2) + I(B^2)))
rsdo$desires(desirability(y, -1, 2, scale = c(1, 1), target = "max"))
rsdo$desires(desirability(y2, -1, 0, scale = c(1, 1), target = "min"))
dVals = overall(rsdo, steps = 10, constraints = list(A = c(-0.5,1), B = c(0, 1)))