R: Main function to minimize the risc function of a sequence of...
JOP
R Documentation
Main function to minimize the risc function of a sequence of cost matrices
Description
JOP calculates optimal design parameters associated with a given sequence of cost matrices
based on the minimization of a risk function introduced by Pignatiello (1993). Furthermore JOP
visualizes the optimal design parameters and the appropriate predicted responses using the joint
optimization plot introduced by Kuhnt and Erdbruegge (2004).
data set with parameter settings from an experimental design (data.frame).
Columns have to be named.
datay
data set with responses resulting from an experimental design (data.frame).
Columns have to be named.
tau
list of target values or single character value for the corresponding responses, where also "min"
for minimization or "max" for maximization is possible. If tau="min" or tau="max", then all
responses are minimized or maximized.
Wstart
value to calculate the sequence of weight matrices (see Details)
Wend
value to calculate the sequence of weight matrices (see Details)
numbW
value to calculate the sequence of weight matrices (see Details)
d
a vector with values to calculate the sequence of weight matrices (see Details)
optreg
User can choose the Optimization region.
optreg="box": box constraints
optreg="sphere": sphere
Domain
box constraints. Column 1 for lower contraints and Column 2 for upper contraints.
Row i corresponds to Parameter i.
form.mean
list of formulas for mean of each response
form.disp
list of formulas for dispersion of each response
family.mean
family for the mean
dlink
list of names of link functions for the dispersion models
mean.model
list of functions that model the mean for the corresponding response
var.model
list of functions that model the variance for the corresponding response
joplot
logical, if TRUE then the joint optimization plot is displayed.
solver
Default is "solnp" for three different starting points. Alternatively,
"gosolnp" is especially recommended for complex programs.
Details
The main function JOP is a package for multiresponse optimization which aims to minimize a risc function
for a prespecified sequence of cost matrices. This sequence of cost matrices is specified by the arguments
Wstart, Wend, numbW and d. The user can plug in target values for the responses or set to the target value
to "min" or "max" in order to minimize or maximize the corresponding response.
JOP needs models for the mean and dispersion of each response which can be
plugged in by means three different possibilities.
First, the user can pass the models for mean and dispersion
as lists of functions in the parameter vector through the arguments var.model and mean.model.
Secondly, the user
can plug in a list of formulas for each response for the mean and dispersion via the arguments form.mean
and form.disp. Furthermore, a suitable link
and distribution assumption can be specified both for the mean and dispersion
Finally, if the user does not plug in neither formulas nor models then JOP calculates automatically
double generalized linear models by means of the function dglm from package dglm.
Furthermore, JOP performs a backward selection, starting from the full model with main effects, interactions
and quadratic terms, and afterwards dropping the least significant covariate in each step.
The data sets datax and datay
are needed for model building. Both datax and datay have to be data frames where datax contains an experimental design with
settings for each parameter columnwise and datay contains the experimental results columnwise for every response. Additionally,
the columns of the data sets should be named, as exemplary demonstrated by data(datax) and data(datay). The optimization is performed
by the procedure solnp out of the package Rsolnp. JOP returns an object of class "JOP" which can be visualized by means of
plot.JOP. Details on the JOP method can be found in Erdbruegge et al. (2011).
Value
JOP returns a list containing the following elements:
Parameters
The i-th row of this matrix contains the optimal Parameter setting appropriate to the i-th weight matrix
Responses
The i-th row of this matrix contains the predicted Responses appropriate to the i-th weight matrix
StandardDeviation
The i-th row of this matrix contains the standard deviation value for each response
OptimalValue
This vector contains the optimal value of the risk function for each optimal parameter setting
TargetValueJOP
Contains the target values for the correspoding responses used internally by JOP
TargetValueUSER
Contains the target values for the correspoding responses specified by the user
DGLM
If no models assigned then the list DGLM contains the calculated models for the mean and dispersion for every response
RiskminimalParameters
Parameters that minimize the squared sum of single risks among all calculated Parameters
RiskminimalResponses
Responses for the risk minimal parameters
ValW
Values for Wstart and Wend
d
Slope vector
numbW
Number of weight matrices
References
Sonja Kuhnt and Martina Erdbruegge (2004). A strategy of robust paramater design for multiple responses,
Statistical Modelling; 4: 249-264, TU Dortmund.
Martina Erdbruegge, Sonja Kuhnt and Nikolaus Rudak (2011). Joint optimization of independent multiple responses based on loss functions,
Quality and Reliability Engineering International 27, doi: 10.1002/qre.1229.
Joseph J. Pignatiello (1993). Strategies for robust multiresponse quality engineering, IIE Transactions 25, 5-15, Texas A M University.
Alexios Ghalanos and Stefan Theussl (2012). Rsolnp: General Non-linear Optimization Using Augmented Lagrange Multiplier Method. R package version 1.12.
Peter K Dunn and Gordon K Smyth (2012). dglm: Double generalized linear models, R package version 1.6.2.
Sonja Kuhnt, Nikolaus Rudak (2013). Simultaneous Optimization of Multiple Responses with the R Package JOP,
Journal of Statistical Software, 54(9), 1-23, URL http://www.jstatsoft.org/v54/i09/.
Examples
# Example: Sheet metal hydroforming process
# Run JOP without Model specification
outtest <- JOP(datax = datax, datay = datay, tau = list(0, 0.05), numbW = 5, joplot = TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(JOP)
Loading required package: Rsolnp
Loading required package: dglm
Loading required package: statmod
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/JOP/JOP.Rd_%03d_medium.png", width=480, height=480)
> ### Name: JOP
> ### Title: Main function to minimize the risc function of a sequence of
> ### cost matrices
> ### Aliases: JOP
>
> ### ** Examples
>
> # Example: Sheet metal hydroforming process
> # Run JOP without Model specification
>
> outtest <- JOP(datax = datax, datay = datay, tau = list(0, 0.05), numbW = 5, joplot = TRUE)
Automatic Modeling starts...
Model building finished ....
Cost matrices calculated ....
Optimization starts ....
| | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% | |======================================================================| 100%
Optimization finished ....
>
>
>
>
>
> dev.off()
null device
1
>