expansive.replace: Expansive replacement for two orthogonal arrays

View source: R/expansive.replace.R

expansive.replaceR Documentation

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)

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 s_1 and s_2 the numbers of levels of the factors in array2, this is the number of partitions of the runs of array2 into s_1 equally-sized groups, multiplied with s_2!^{s_1-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).

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.

Note

This package is still under development. Bug reports and feature requests are welcome.

Author(s)

Ulrike Groemping

References

Kuhfeld, W. (2009). Orthogonal arrays. Website courtesy of SAS Institute https://support.sas.com/techsup/technote/ts723b.pdf and references therein.

See Also

See Also oacat, oacat3

Examples

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)

## End(Not run)

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