View source: R/3.3_Factorial_designs_Functions.R
overall | R Documentation |
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.
overall(fdo, steps = 20, constraints, ...)
fdo |
An object of class |
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 |
... |
Further arguments passed to other methods. |
A data.frame
with a column for each factor, the desirability for each response, and a column for the overall desirability.
facDesign
, rsmDesign
, desirability
.
#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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.