param.design: Function to generate Taguchi style parameter designs

View source: R/param.design.R

param.designR Documentation

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 be randomized

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 same row

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 responses is specified;
for the wide format, response columns are always generated (one column per run of the outer array for each response): if responses is NULL, response columns are called "y.1", "y.2" etc., if responses is specified, a set of response columns for each specified name is generated

design

parameter design in long format (created by function param.design)

constant

character vector giving names of variables in addition to the experimental factors of the inner array that are constant over outer array runs for each inner array run

...

currently not used

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).

Value

A data frame of class design with type “param” or “FrF2.param” for long version inner/outer array designs, and type of the inner array suffixed with “.paramwide” for wide version inner/outer array designs. The design.info attribute of such designs has the following extraordinary elements:

In long format, there are the same elements as for type crossed from function cross.design, and the additional elements inner and outer that give the names of the inner and outer array variables.

In wide format, the design.info information refers to the inner array, the elements cross... something are no longer available (except for cross.types), and the element outer contains the outer array design the rows of which correspond to the response columns. The additional element format with value “innerouterWide” indicates the wide format (introduced for analogy to wide repeated measures designs), and responselist shows the responses and their respective columns in support of subsequent aggregation. Finally, if there are variables that are neither experimental factors nor responses and change within one run of the inner array, these are listed in restlist.

Note

This function is still experimental.

Author(s)

Ulrike Groemping

References

NIST/SEMATECH e-Handbook of Statistical Methods, Section 5.5.6 (What are Taguchi Designs?), accessed August 11, 2009. https://www.itl.nist.gov/div898/handbook/pri/section5/pri56.htm

See Also

See Also cross.design

Examples

## 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, 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, 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
## Not run: 
   ### 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=",")

## End(Not run)

DoE.base documentation built on Nov. 15, 2023, 1:06 a.m.