cross.design {DoE.base}R Documentation

Function to cross several designs

Description

This function generates cartesian products of two or more experimental designs.

Usage

cross.design(design1, design2, ..., randomize = TRUE, seed=NULL)

Arguments

design1 a data frame of class design that restricted by certain criteria (cf. details)
if design1 is not of class design, crossing will nevertheless work, but the output object will be a data frame only without any design information; there is no guaranteed support for this usage
design2 a data frame of class design with the same restrictions for design type as for design1;
can also be a vector if ... is not used;
cf. details for what is allowed regarding replications
... optional further data frames that are to be crossed; they must be of class design with the above-mentioned restrictions for design types; the last element can also be a vector
randomize logical indicating whether randomization should take place after crossing the designs
seed seed for random number generation

Details

Crossing is carried out recursively, following the direct.sum approach from package conf.design. All but the last designs must fulfill various criteria (cf. below). The last design to be crossed can also be a vector.

Designs to be crossed must not be a blocked, nor splitplot, nor crossed, folded or Taguchi parameter design, nor designs in wide format. Furthermore, designs must not contain responses (checked via the response.names element of design.info).

If replications are desired, it is recommended to accomodate them in the last design. Only the last design may have repeat.only replications. If the last design has repeat.only replications and there are also proper replications in earlier designs, a warning is thrown, but the repeat.only replications are nevertheless accomodated; this is experimental and may not yield the expected results under all circumstances.

Value

Function cross.design returns a simple data frame without design information, if design1 is not of class design.
Otherwise, the value is a data frame of class design with type “crossed” and the following extraordinary elements:

cross.nruns vector of run numbers of individual designs
cross.nfactors vector of numbers of factors of individual designs
cross.types vector of types of individual designs
cross.randomize vector of logicals (randomized or not) of individual desigs
cross.seed vector of seeds of individual designs
cross.replications vector of numbers of replications of individual designs
cross.repeat.only vector of logicals (repeat.only or not) of individual designs
cross.map list with the map vectors for component designs of type FrF2.estimable
cross.selected.columns NULL (if no oa type design) or list of column vectors for each design
cross.nlevels list with the nlevels vectors for those component designs that have them


The standard elements are as usual, with randomize and seed referring to the randomization within function cross.design itself (previous randomizations are shown under cross.randomize and cross.seed).
The nlevels element of design.info is available only if it is available for all designs that have been crossed (otherwise refer to the element cross.nlevels.
The creator element of the design.info attribute consists is a 2-element list containing
the list original of all the original creators and
the element modify that contains the call to cross.design.
If present, the clear, ncube, ncenter, residual.df, origin, comment, generating.oa elements of design.info are vector-valued.
If present, the generators element of design.info is a list of character vectors.
If present, the aliased and catlg.entry elements of design.info are lists of lists.

Note

This function is still experimental.

Author(s)

Ulrike Groemping

See Also

See Also param.design

Examples

   ## creating a Taguchi-style inner-outer array design
   ## with proper randomization
   ##   function param.design would generate such a design with all outer array runs 
   ##     for each inner array run conducted in sequence
   ##   alternatively, a split-plot approach can also handle control and noise factor 
   ##     designs without necessarily crossing two separate designs
   des.control <- oa.design(ID=L18.2.1.3.7)
   des.noise <- oa.design(ID=L4.2.3,nlevels=2,factor.names=c("N1","N2","N3"))
   crossed <- cross.design(des.control, des.noise)
   crossed
   summary(crossed)

[Package DoE.base version 0.9-14 Index]