DoE.base (version 1.1-3)

expansive.replace: Expansive replacement for two orthogonal arrays

Description

Expansive replacement for two orthogonal arrays

Usage

expansive.replace(array1, array2, fac1 = NULL, all = FALSE)

Arguments

array1

an orthogonal array, must be a matrix; the levels of column fac1 of this array are replaced by the corresponding runs of array2; they must be numbered with integers starting with 1

array2

an orthogonal array, must be a matrix this array is replaced for a column in array1

fac1

if NULL, the first suitable column of array1 is replaced with array2; alternatively, a suitable column number for array1 can be specified

all

logical; TRUE is permitted, if array2 is a full factorial in two factors; if TRUE, a list of permutations of the replacement array array2 is used for creating all potentially combinatorially different outcomes, instead of a single expansive replacement based on the order of array2 as stated (see Details section)

Value

The function returns an object of classes oa and matrix, which can be used in function oa.design, or a list of such arrays, in case all = TRUE.

Whether or not the object is an orthogonal array depends on the choice of suitable input arrays by the user. The properties of the resulting array(s) can e.g. be inspected with functions GWLP or GRind.

Details

This function mainly is meant for combining two orthogonal arrays via what Kuhfeld (2009) calls expansive replacement.

If array2 is a full factorial in two factors, argument all = TRUE creates a list of expanded arrays obtained by permuting the second array in all ways that may lead to combinatorially different end results. With s1 and s2 the numbers of levels of the factors in array2, this is the number of partitions of the runs of array2 into s1 equally-sized groups, multiplied with s2!^(s1-1) for the possibilities of permuting the levels of the second factor within all but the first level of the first factor. This functionality is primarily meant for the creation of strength 3 arrays in combination with arrays listed in the catalogue oacat3 (see an example on expanding the 6-level factor in L96.2.5.4.2.6.1).

References

Kuhfeld, W. (2009). Orthogonal arrays. Website courtesy of SAS Institute http://support.sas.com/techsup/technote/ts723.html.

See Also

See Also oacat, oacat3

Examples

Run this code
# NOT RUN {
myL24.2.14.6.1 <- expansive.replace(L24.2.12.12.1, L12.2.2.6.1)

L96.2.6.3.1.4.2_list <- expansive.replace(L96.2.5.4.2.6.1, 
      cbind(U=rep(c(1,2),each=3), V=rep(1:3,2)), all=TRUE)
## the list of 60 resolution IV arrays can be used for design creation, 
## e.g. as follows:
# }
# NOT RUN {
     ## resolution IV designs obtained from the 60 different arrays
     deslist <- lapply(L96.2.6.3.1.4.2_list, 
         function(aa) oa.design(aa, nlevels=c(2,2,2,2,3,4,4), columns="min34"))
     table(A4s <- sapply(deslist, length4))  ## a single best design exists
     best <- deslist[[which(A4s < 2)]]
     GWLP(best)
# }

Run the code above in your browser using DataCamp Workspace