Learn R Programming

DoE.base (version 0.2)

oa.design: Function for accessing orthogonal arrays

Description

Function for accessing orthogonal arrays

Usage

oa.design(ID=NULL, nruns=NULL, nfactors=NULL, nlevels=NULL, 
      factor.names = if (!is.null(nfactors)) {
        if (nfactors 

Arguments

ID
name of the orthogonal array design to be used; available names can be looked at via oacat$name; users can also specify names of their own designs here (cf. details). ID must be of class oa
nruns
number of runs, can be omitted if obvious from ID or if the smallest possible array is to be found
nfactors
number of factors; only needed if nlevels is a single number and factor.names is omitted; can otherwise determined from length of factor.names, nlevels or col
nlevels
number(s) of levels, vector with nfactors entries or single number; can be omitted, if obvious from factor.names or if ID and columns are given or if all columns of ID ar
factor.names
like in FrF2
columns
vector of column numbers referring to columns of design ID; must not be specified, if ID is omitted; the entries assign columns of the array to the factors
replications
the number of replications of the array, the setting of repeat.only determines, whether these are real replications or repeated measurements only. Note that replications are not considered for accomodation of
repeat.only
default FALSE implies real replications, TRUE implies repeated measurements only
randomize
logical indicating whether the run order is to be randomized ?
seed
integer seed for the random number generator
min.residual.df
minimum number of residual degrees of freedom

Value

  • oa.design returns a data frame of S3 class design with attributes attached. Factors with numerical levels are numeric, factors with character levels are factors. The content of the attributes in class design depends on the specific type of design used. origin and comment return the respective attribute of the orthogonal array.

Details

Function oa.design assigns factors to the columns of orthogonal arrays that are available within package DoE.wrapper. The available arrays and their properties are listed in the data frame oacat. The design names also indicate the number of runs and the numbers of factors for each number of levels, e.g. L18.2.1.3.7 is an 18 run design with one factor with 2 levels and seven factors with 3 levels each. oa is the S3 class used for orthogonal arrays. Objects of class oa should at least have the attribute origin, an attribute comment should be used for additional information. Users can define their own orthogonal arrays and hand them to oa.design with parameter ID. Requirements for the arrays: Factor levels must be coded as a numbers from 1 to number of levels. The array must be of classes oa and matrix. The array should have an attribute origin. The array can have an attribute comment; this should be used for mentioning specific properties, e.g. for the L18.2.1.3.7 that the interaction of the first two factors can be estimated. Users are encouraged to send additional arrays to the package maintainer. The requirements for these are the same as listed above, with attribute origin being a MUST in this case. Currently, package DoE.base contains the orthogonal arrays from Warren Kuhfelds collection of parent arrays only. It is possible to combine these with each other, or with Plackett-Burman, full or fractional factorial designs by nesting, as described by Warren Kuhfeld. This is not currently implemented. If no orthogonal array is found, oa.design returns a full factorial, replicated for enough degrees of freedom, if necessary. Note that replications specified with option replications are not counted in determining residual degrees of freedom for min.resid.df. Default factor names are the first elements of the character vector Letters, or the factors position numbers preceded by capital F in case of more than 50 factors.

References

Hedayat, A.S., Sloane, N.J.A. and Stufken, J. (1999) Orthogonal Arrays: Theory and Applications, Springer, New York. Kuhfeld, W. (2009). Orthogonal arrays. Website courtesy of SAS Institute http://support.sas.com/techsup/technote/ts723.html.

See Also

~~See Also FrF2, oa.design, pb

Examples

Run this code
## smallest available array for 6 factors with 3 levels each
  oa.design(nfactors=6,nlevels=3)
  ## level combination for which only a full factorial is (currently) found
  oa.design(nlevels=c(4,3,3,2))
  ## array requested via factor.names
  oa.design(factor.names=list(one=c("a","b","c"), two=c(125,275), three=c("old","new"), four=c(-1,1), five=c("min","medium","max")))
  ## array requested via character factor.names and nlevels (with a little German lesson for one two three four five)
  oa.design(factor.names=c("eins","zwei","drei","vier","fuenf"),nlevels=c(2,2,2,3,7))
  ## array requested via explicit name, Taguchi L18
  oa.design(ID=L18)
  ## array requested via explicit name, with column selection
  oa.design(ID=L18.3.6.6.1,columns=c(2,3,7))
  ## array requested with nruns, not very reasonable
  oa.design(nruns=12, nfactors=3, nlevels=2)
  ## array requested with min.residual.df
  oa.design(nfactors=3, nlevels=2, min.residual.df=12)

Run the code above in your browser using DataLab