Learn R Programming

DoE.base (version 0.5)

param.design: Function to generate Taguchi style parameter designs

Description

The functions create parameter designs for robustness experiments and signal-to-noise investigations with inner and outer arrays and facilitate their formatting and data aggregation.

Usage

param.design(inner, outer, direction="long", responses=NULL, ...)
paramtowide(design, constant=NULL, ...)

Arguments

inner
an experimental design for the inner array, data frame of class design; as function param.design does not randomize, its runs should already
outer
an experimental design for the outer array, data frame of class design or vector
direction
character taking the values wide or long; if long, the outer array runs for each inner array run are listed underneath each other; if wide, they are listed within the s
responses
NULL, or character vector of response names; for the long format, there are no response columns if responses is NULL, while response columns of the specified name(s) containing NA values are generated if
design
parameter design in long format (created by function param.design)
constant
character vector giving names of variables in addition to experimental factors of inner array that are constant over outer array runs for each inner array run
...
currently not used

Value

  • A data frame of class design with type param, paramwide, FrF2.param or FrF2.paramwide and the following extraordinary elements: In long format, there are the same elements as for type crossed from function cross.design.:
  • cross.nrunsvector of run numbers of individual designs
  • cross.nfactorsvector of numbers of factors of individual designs
  • cross.typesvector of types of individual designs
  • cross.randomizevector of logicals (randomized or not) of individual desigs
  • cross.seedvector of seeds of individual designs
  • cross.replicationsvector of numbers of replications of individual designs
  • cross.repeat.onlyvector of logicals (repeat.only or not) of individual designs
  • cross.selected.columnsNULL (if no oa type design) or list of column vectors for each design
  • cross.creatorlist of creator components for each design
  • Some of the standard elements are 2-element lists or vectors (e.g. creator). In wide format, the elements cross.nruns and cross.nfactors are unavailable. instead, there are the additional elements format with value innerouterWide, responselist and, if there are variables that are neither experimental factors nor responses, restlist for those of these that do change with repeated measurements.

Details

A parameter design is an experimental plan for setting the so-called control parameters such that they achieve the intended function and at the same time minimize the effects of the so-called noise parameters. Note that the word parameters is used here in an engineering sense rather than in the typical sense it is used in statistics. The experiment crosses the control factors in the inner array with the noise factors in the outer array. Function param.design uses function cross.design for creating an inner/outer array crossed design. There will be data aggregation functions for such designs in the near future. Note that designs created by param.design are not properly randomized, as they are conducted in the Taguchi inner / outer array sense with the runs of the inner array as whole plots and the factors of the outer array as split-plot factors. With analysis methods that work on data aggregated over the outer array this is appropriate. If analysis of control and noise factor designs is to be conducted in a combined approach, the experiment should be fully randomized. This can be done using function cross.design directly (cf. example there).

References

~put references to the literature/web site here ~

See Also

See Also cross.design

Examples

Run this code
## It is recommended to use param.design particularly with FrF2 designs. 
## For the examples to run without package FrF2 loaded, 
## oa.design designs are used here.

## quick preliminary checks to try out possibilities
control <- oa.design(L18.2.1.3.7, columns=1:4, factor.names=paste("C",1:4,sep=""))
noise <- oa.design(L4.2.3, columns=1:3, factor.names=paste("N",1:3,sep=""))
## long
long <- param.design(control,noise)
## wide
wide <- param.design(control,noise,direction="wide")
wide
long

## use proper labelled factors
## should of course be as meaningful as possible for your data
fnc <- c(list(c("current","new")),rep(list(c("type1", "type2","type3")),3))
names(fnc) <- paste("C", 1:4, sep="")
control <- oa.design(L18.2.1.3.7, factor.names=fnc)
fnn <- rep(list(c("low","high")),3)
names(fnn) <- paste("N",1:3,sep="")
noise <- oa.design(L4.2.3, factor.names = fnn)
ex.inner.outer <- param.design(control,noise,direction="wide",responses=c("force","yield"))
ex.inner.outer              
## export e.g. to Excel or other program with which editing is more convenient
### design written to default path as html and rda by export.design
   ### html can be opened with Excel
   ### data can be typed in 
   ### for preparation of loading back into R, 
   ###     remove all legend-like comment that does not belong to the data table itself
   ###     and store as csv
   ### reimport into R using add.response
   ### (InDec and OutDec are for working with German settings csv 
   ###     in an R with standard OutDec, i.e. wrong default option)
   getwd()  ## look at default path, works on most systems
   export.design(ex.inner.outer, OutDec=",")
   add.response("ex.inner.outer", "ex.inner.outer.csv", "ex.inner.outer.rda", InDec=",")

Run the code above in your browser using DataLab