Package Desire': R Topics Documented
Package Desire': R Topics Documented
R topics documented:
Chocolate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
compositeDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
ddesire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
derringerSuich . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
dsplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
geometricDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
harrington1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
harrington2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Internal functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
meanDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
minimumDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
normMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
plot.desire.function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
plot.harrington2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
realisticDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Index 21
1
2 compositeDF
Description
...
Usage
Chocolate
Format
A data.frame containing 13 observations
Source
C....
References
C. Alamprese, L. Datei, Q. Semeraro (2007). Optimization of processing parameters of a ball mill
refiner for chocolate. Journal of Food Engineering, 83(4), 629–636.
Description
Combines a desirability function with an inner function and returns a new function object which
calculates d(f (x)).
Usage
compositeDF(expr, d, ...)
Arguments
expr any valid inner function
d desirability function
... additional arguments passed to function
Details
Currently specialized for expressions, functions and objects with class lm.
ddesire 3
Value
A function object of a composite desirability function.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
G.C. Derringer, D. Suich (1980): Simultaneous optimization of several response variables. Journal
of Quality Technology 12 (4): 214-219.
D. Steuer (2005): Statistische Eigenschaften der Multikriteriellen Optimierung mittels Wuenschbarkeiten.
Dissertation, Dortmund University of Technology, http://hdl.handle.net/2003/20171.
H. Trautmann, C. Weihs (2006): On the Distribution of the Desirability Index using Harrington’s
Desirability Function. Metrika 63(2): 207-213.
See Also
harrington1 and harrington2 for Harrington type desirability functions; derringerSuich for
desirability functions of Derringer and Suich;
Examples
h <- harrington2(-1, 1, 1)
## Calculate h(x^2):
ch1 <- compositeDF(x^2, h)
ch1(0.5)
ch1(c(0.2,0.5,0.7))
## Calculate h(f(x))
f <- function(x) 2*x + 3
ch2 <- compositeDF(f, h)
ch2(0.3)
ch2(c(0.3,0.35,0.9))
Description
Generic density, distribution, quantile and random number generation functions for desirability
functions.
4 ddesire
Usage
## Default S3 method:
ddesire(x, f, mean = 0, sd = 1)
## Default S3 method:
pdesire(q, f, mean = 0, sd = 1)
## Default S3 method:
qdesire(p, f, mean = 0, sd = 1)
## Default S3 method:
rdesire(n, f, mean = 0, sd = 1)
## Default S3 method:
edesire(f, mean, sd)
## Default S3 method:
vdesire(f, mean, sd)
Arguments
Value
’ddesire’ gives the density, ’pdesire’ gives the distribution function, ’qdesire’ gives the quantile
function, and ’rdesire’ generates random deviates.
’edesire’ and ’vdesire’ return the expectation and variance of the function.
Note
The default implementations for pdesire, qdesire, edesire and vdesire are only approximations
obtained by estimating the desired property from a random sample.
Author(s)
See Also
Examples
data(Chocolate)
## Integrate:
integrate(function(x) ddesire(x, d.d90, y.d90, sigma.d90), 0, 1)
integrate(function(x) ddesire(x, d.Fe, y.Fe, sigma.Fe), 0, 1)
Description
Returns a function evaluating a (generalized) Derringer-Suich desirability.
Usage
derringerSuich(y, d, beta)
Arguments
y y
d d
beta beta
Details
If only y is provided and it is a vector of length 5, a normal (l, t, u, β1 , β2 ) Derringer Suich desirabil-
ity is constructed. Otherwise y, d and beta specify a generalized Derringer Suich type desirability.
6 dsplot
Value
derringerSuich returns a function.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
G. Derringer and R. Suich (1980), Simultaneous optimization of several response variables, Journal
of Quality Technology, Vol. 12, No. 4:214-219.
D. Steuer (2005), Statistische Eigenschaften der Multikriteriellen Optimierung mittels Wuenschbarkeiten,
PhD Thesis, http://hdl.handle.net/2003/20171.
See Also
harrington1 for one sided Harrington type desirabilities and harrington2 for two sided Harring-
ton type desirabilities.
Examples
## Simple (l, t, u, b0, b1) Derringer-Suich desirabilities:
d1 <- derringerSuich(c(0, 1, 2, 1, 1))
d2 <- derringerSuich(c(0, 1, 2, 2, 2))
d3 <- derringerSuich(c(0, 1, 2, .5, .5))
## d/p/q/r examples:
ddesire(.2, d1, 0, 1)
pdesire(.5, d1, 0, 1)
qdesire(.8, d1, 0, 1)
Description
Plot a desirability function and its relation to an arbitrary expression.
geometricDI 7
Usage
dsplot(expr, f, from = NULL, to = NULL, n = 101,
show.zero = TRUE, interest = NULL,
main = "Desirability Plot", sub = NULL, ...)
Arguments
expr an expression written as a function of ’x’, or alternatively the name of a function
which will be plotted.
f desirability function
from,to the range over which the function will be plotted.
n integer; the number of x values at which to evaluate.
show.zero add dotted line to visualize the origin
interest vector of interesting points
main an overall title for the plot
sub a subtitle for the plot
... parameters passed to low level plot functions
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
Examples
d1 <- harrington2(2, 4, 2)
dsplot(x*log(x), d1,
from=0, to=6, n=507,
interest=c(2, 3, 4))
Description
Computes the weighted geometric mean of a number of desirability functions.
Usage
geometricDI(f, ..., weights)
Arguments
f, ... desirability functions
weights vector of weights
8 geometricDI
Details
The Desirability Index was introduced by Harrington (1965), and the concept was extended by
Derringer and Suich (1980). It is a means for multicriteria (quality) optimization in industrial
quality management. All desirability functions of the quality criteria are combined into a univariate
global quality criterion in [0,1] which has to be optimized.
The function can be used for Harrington as well as Derringer and Suich desirability functions.
Value
geometricDI(f, ..., weights) returns a function object of the Geometric Mean Desirability
Index.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
G.C. Derringer, D. Suich (1980): Simultaneous optimization of several response variables. Journal
of Quality Technology 12 (4): 214-219.
D. Steuer (2005): Statistische Eigenschaften der Multikriteriellen Optimierung mittels Wuenschbarkeiten.
Dissertation, Dortmund University of Technology, http://hdl.handle.net/2003/20171.
H. Trautmann, C. Weihs (2006): On the Distribution of the Desirability Index using Harrington’s
Desirability Function. Metrika 63(2): 207-213.
See Also
harrington1 and harrington2 for Harrington type desirability functions; derringerSuich for
desirability functions of Derringer and Suich; minimumDI,meanDI for other types of Desirability
indices.
Examples
h1 <- harrington1(-2, .9, 2, .1)
h2 <- harrington2(0, 2, 2)
Description
Returns a one-sided desirability function of the Harrington type. Density, distribution function,
quantile function and random number generation for the distribution of the one-sided Harrington
desirability function are computed given a normally distributed variable Y with expected value
equal to mean and standard deviation equal to sd.
Usage
harrington1(y1, d1, y2, d2)
## S3 method for class 'harrington1'
ddesire(x, f, mean, sd)
## S3 method for class 'harrington1'
pdesire(q, f, mean, sd)
## S3 method for class 'harrington1'
qdesire(p, f, mean, sd)
## S3 method for class 'harrington1'
edesire(f, mean, sd)
## S3 method for class 'harrington1'
vdesire(f, mean, sd)
dharrington1(x, y1, d1, y2, d2, mean, sd)
pharrington1(q, y1, d1, y2, d2, mean, sd)
qharrington1(p, y1, d1, y2, d2, mean, sd)
rharrington1(n, y1, d1, y2, d2, mean, sd)
eharrington1(y1, d1, y2, d2, mean, sd)
vharrington1(y1, d1, y2, d2, mean, sd)
Arguments
x,q vector of quantiles.
p vector of probabilies.
n number of observations.
f one-sided Harrington type desirability function.
y1,d1,y2,d2 Two values y1 and y2 of variable Y with respective desirability values d1 and
d2 determine the shape of the desirability function.
mean vector of expected values of normal distributions.
sd vector of standard deviations of normal distributions.
Details
harrington1(y1, d1, y2, d2) is the one-sided desirability function of Harrington type (Harring-
ton (1965)). It aims at the specification of desired values of a variable Y which has to be minimized
or maximized. Y is transformed onto a unitless scale to the interval [0,1].
10 harrington1
Harrington’s one-sided desirability function d given a normally distributed variable Y with E(Y ) =
mean and sd(Y ) =sd has the Double Lognormal Distribution (Holland and Ahsanullah (1989)).
Value
harrington1(y1, d1, y2, d2) returns a function object of the one-sided desirability function of
the Harrington type (see example below). Values b0 and b1 of the desirability function formula are
determined.
ddesire /dharrington1 give the density, pdesire / pharrington1 give the distribution function,
qdesire / qharrington1 give the quantile function, and rdesire / rharrington1 generate random
deviates. edesire / eharrington1 and vdesire / vharrington1 compute the expected value
and the variance of the desirability function for a normally distributed random variable Y with
E(Y ) =mean and sd(Y ) =sd.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
B. Holland, M. Ahsanullah (1989): Further Results on the Distribution of Meinhold and Singpur-
walla. The American Statistician 43 (4): 216-219.
H. Trautmann, C. Weihs (2006): On the Distribution of the Desirability Index using Harrington’s
Desirability Function. Metrika 63(2): 207-213.
See Also
harrington2 for two sided Harrington type desirabilities
Examples
##Assigning the function object to h:
h <- harrington1(-2, .1, 2, .9)
## d/p/q/r/e/v examples:
ddesire(.8, h, 0, 1)
dharrington1(.8, -2, .1, 2, .9, 0, 1)
pdesire(.8, h, 0, 1)
pharrington1(.8, -2, .1, 2, .9, 0, 1)
harrington2 11
qdesire(.8, h, 0, 1)
qharrington1(.8, -2, .1, 2, .9, 0, 1)
rdesire(1e6, h, 0, 1)
rharrington1(1e6, -2, .1, 2, .9, 0, 1)
edesire(h,3,0.5)
eharrington1(-2, .1, 2, .9,3,0.5)
vdesire(h,3,0.5)
vharrington1(-2, .1, 2, .9,3,0.5)
Description
Returns a two sided desirability function of the Harrington type. Density, distribution function,
quantile function and random number generation for the distribution of the two-sided Harrington
desirability function are computed given a normally distributed variable Y with expected value
equal to mean and standard deviation equal to sd.
Usage
harrington2(LSL, USL, n)
## S3 method for class 'harrington2'
ddesire(x, f, mean, sd)
## S3 method for class 'harrington2'
pdesire(q, f, mean, sd)
## S3 method for class 'harrington2'
qdesire(p, f, mean, sd)
dharrington2(x, LSL, USL, n, mean, sd)
pharrington2(q, LSL, USL, n, mean, sd)
qharrington2(p, LSL, USL, n, mean, sd)
rharrington2(ns, LSL, USL, n, mean, sd)
eharrington2(LSL, USL, n, mean, sd)
vharrington2(LSL, USL, n, mean, sd)
Arguments
x,q vector of quantiles.
p vector of probabilies.
ns number of observations.
12 harrington2
Details
Value
harrington2(LSL, USL, n) returns a function object of the two-sided desirability function of the
Harrington type (see example below).
ddesire / dharrington2 give the density, pdesire / pharrington2 give the distribution function,
qdesire / qharrington2 give the quantile function, and rdesire / rharrington2 generate random
deviates. edesire / eharrington2 and vdesire / vharrington2 compute the expected value
and the variance of the desirability function for a normally distributed random variable Y with
E(Y ) =mean and sd(Y ) =sd.
Author(s)
References
See Also
Examples
##Assigning the function object to h:
h <- harrington2(3,7,1)
## d/p/q/r/e/v examples:
ddesire(4, h, 0, 1)
dharrington2(4, 3, 7, 1, 0, 1)
ddesire(4, h, c(0,0.5),c(1,1.5))
pdesire(4, h, 0, 1)
pharrington2(4, 3, 7, 1, 0, 1)
qdesire(0.8, h, 0, 1)
qharrington2(0.8, 3, 7, 1, 0, 1)
rdesire(1e6, h, 0, 1)
rharrington2(1e6, 3, 7, 1, 0, 1)
edesire(h,3,0.5)
vdesire(h,3,0.5)
Description
Functions not exported and not intended for general use.
Usage
h1.solve.params(y1, d1, y2, d2)
Arguments
y1 y1
d1 d1
y2 y2
d2 d2
14 meanDI
Description
Computes the weighted mean of a number of desirability functions.
Usage
meanDI(f, ..., weights = 1)
Arguments
f,... desirability functions.
weights vector of weights. Weights do not need to sum to one.
Details
The Desirability Index was introduced by Harrington (1965), and the concept was extended by
Derringer and Suich (1980). It is a means for multicriteria (quality) optimization in industrial
quality management. All desirability functions of the quality criteria are combined into a univariate
global quality criterion which has to be optimized. The Weighted Mean Desirability Index is related
to the concept of utility functions.
The function can be used for Harrington as well as Derringer and Suich desirability functions.
Value
meanDI(f, ..., weights) returns a function object of the Weighted Mean Desirability Index.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
G.C. Derringer, D. Suich (1980): Simultaneous optimization of several response variables. Journal
of Quality Technology 12 (4): 214-219.
See Also
harrington1 and harrington2 for Harrington type desirability functions; derringerSuich for
desirability functions of Derringer and Suich; geometricDI,minimumDI for other types of Desir-
ability indices.
minimumDI 15
Examples
h1 <- harrington1(-2, .9, 2, .1)
h2 <- harrington2(0, 2, 2)
Description
Computes the minimum of a number of desirability functions.
Usage
minimumDI(f, ...)
Arguments
f,... desirability functions
Details
The Desirability Index was introduced by Harrington (1965), and the concept was extended by
Derringer and Suich (1980). It is a means for multicriteria (quality) optimization in industrial
quality management. All desirability functions of the quality criteria are combined into a univariate
global quality criterion in [0,1] which has to be optimized.
The function can be used for Harrington as well as Derringer and Suich desirability functions.
Value
minimumDI(f, ...) returns a function object of the Minimum Desirability Index.
16 normMax
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
G.C. Derringer, D. Suich (1980): Simultaneous optimization of several response variables. Journal
of Quality Technology 12 (4): 214-219.
D. Steuer (2005): Statistische Eigenschaften der Multikriteriellen Optimierung mittels Wuenschbarkeiten.
Dissertation, Dortmund University of Technology, http://hdl.handle.net/2003/20171.
H. Trautmann, C. Weihs (2006): On the Distribution of the Desirability Index using Harrington’s
Desirability Function. Metrika 63(2): 207-213.
See Also
harrington1 and harrington2 for Harrington type desirability functions; derringerSuich for
desirability functions of Derringer and Suich; geometricDI,meanDI for other types of Desirability
indices.
Examples
h1 <- harrington1(-2, .9, 2, .1)
h2 <- harrington2(0, 2, 2)
d <- minimumDI(h, g)
Description
Desirability functions based on the normal distribution. These where developed by XXX in order
to improve YYY.
normMax 17
Usage
normMax(LSL, USL)
normMin(LSL, USL)
normTarget(LSL, T, USL)
Arguments
LSL Lower specification limit
T Target value
USL Upper specification limit
Value
normMin and normMax return functions implementing the specified minimzation or maximizing
desirability. normTarget returns a function implementing the specified target desirability.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
XXX Technical Report ZZZ
See Also
harrington1 for one sided Harrington type desirabilities, harrington2 for two sided Harrington
type desirabilities and derringerSuich for Derringer-Suich type desirabilities.
Examples
## Create desirability functions:
d1 <- normMin(-1, 1)
d2 <- normMax(-1, 1)
d3 <- normTarget(-1, 0, 1)
## Show
dsplot(log(x), d1, .5, 2)
dsplot(sin(x), d2, -pi, pi)
dsplot(cos(x), d3, 0, 2*pi)
18 plot.harrington2
Description
Plot a desirability function.
Usage
## S3 method for class 'desire.function'
plot(x, n = 600, xlim = NULL, ylim = c(0, 1),
xlab = "Value", ylab = "Desirability", ..., main)
Arguments
x desirability function
n the number of x values at which to evaluate.
xlim numeric of length 2; if specified, it serves as the default for the range of x values.
ylim numeric of length 2; if specified, it serves as the default for the range of y values.
xlab x axes label
ylab y axes label
... arguments passed to lines.
main main title of plot
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
Description
Plots a two-sided desirability function of the Harrington type.
Usage
## S3 method for class 'harrington2'
plot(x, ...)
realisticDF 19
Arguments
x two-sided Harrington desirability function.
... additional parameters passed to plot.
Details
Lower Specification Limit (LSL) and Upper Specification Limit (U SL) are visualized. The default
range of the x-axis is selected automatically.
Value
R-graphics plot object of two-sided Harrington desirability function.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
References
J. Harrington (1965): The desirability function. Industrial Quality Control, 21: 494-498.
See Also
harrington2 for two sided Harrington type desirabilities, plot
Examples
##Assigning a function object to h:
h <- harrington2(3,7,1)
plot(harrington2(4,8,1.5))
Description
Convert a desirability into a realistic desirability.
Usage
realisticDF(f, ...)
## S3 method for class 'desire.function'
realisticDF(f, ...)
20 realisticDF
Arguments
f desirability function
... ...
Details
To construct a composite realistic desirability, first create a realistic desirability and then compose
it. Doing the opposite is currently unsupported. This allows the composition to possibly pass a
standard deviation which can be deduced from the inner function (eg. if the inner function is an
object of class lm).
Value
A function with the same arguments as x and sd, which returns the realistic desirability.
Author(s)
Heike Trautmann <[email protected]>, Detlef Steuer <[email protected]>
and Olaf Mersmann <[email protected]>
See Also
minimumDI
Index
21
22 INDEX
vdesire.harrington1 (harrington1), 9
vdesire.harrington2 (harrington2), 11
vharrington1 (harrington1), 9
vharrington2 (harrington2), 11