Get and set methods

Share:

Description

Set or get the desirability for each response of a factorial design. The desirability is stored in the facDesign object. Setting desirabilities is required for optimization of multiple responses.

Usage

1
2
3
4
## S4 method for signature 'facDesign'
desires(x)
## S4 replacement method for signature 'facDesign'
desires(x) <- value

Arguments

x

an object of class facDesign

value

an object of class desirability; see example

Methods

signature(objectc = "facDesign")

Get and set the desires for an object of class facDesign.

Author(s)

Thomas Roth thomas.roth@tu-berlin.de

References

DERRINGER, G.; SUICH, R. 'Simulaneous Optimization of Several Response Variables', Journal of Quality Technology, vol. 12, no. 4. 214-219, 1980.

See Also

desirability
fits
optimum
http://www.r-qualitytools.org

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#create a response surface design
fdo = rsmDesign(k = 2, blocks = 2, alpha = "both")

#set two responses for the response surface designs
response(fdo) = data.frame(y= rnorm(14, 12, sd =  2), 
                           y2 =  -2*fdo[,4]^2 - fdo[,5]^2 + rnorm(14, 12))

#set a fit for each response
fits(fdo) = lm(y ~ A*B , data = fdo)
fits(fdo) = lm(y2 ~ A*B + I(A^2) + I(B^2), data = fdo)

#define a desirability for response y
d = desirability(y, 6, 18, scale = c(0.5, 2), target = 12)

#plot the desirability function
plot(d)

#set the desirability for y and y2 in the factorial design fdo
desires(fdo) = d
desires(fdo) = desirability(y2, 6, 18, scale = c(1, 1), target = "min")
desires(fdo)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.