choosedef2(k,p, all:T or tries:m), k, p, m > 0 integer scalars |

choosedef2(k, p, all:T) searches all potential defining contrasts to find a set for a 2^k factorial design in 2^p blocks. k must be an integer between 1 and 32 and p an integer < k. choosedef2(k,p,tries:m) does the same, except only m random sets of defining contrasts are searched. In both cases, the defining contrasts for the minimum aberration design among those searched is returned. The return value is structure(generators:bestgen, aberration:aber, basis:genmat). bestgen is a CHARACTER vector of length p with the names such as "ABDF" of the defining contrasts in the set chosen. aber is a vector of k integers >= 0 with ab[i] containing the number of contrast with i letters that are confounded with "I". genmat is a p by k matrix with entries 0 and 1, one row for each element of bestgen. genmat[i,j] is 1 if and only if factor j is bestgen[i]. For example, if bestgen[i] is "ABDF", genmat[i,] is vector(1,1,0,1,0,1 [,...])'. genmat can be used as an argument to aliases2() to determine all the aliases of any contrast. See also aliases2() choosegen2(), confound2().

Gary Oehlert 2003-01-15