R/createSaturated.R
createSaturated.Rd
produces an OA(s^k, (s^k-1)/(s-1), s, 2) (Rao-Hamming construction)
createSaturated(s, k = 2)
the prime or prime power to use
integer; determines the run size: the resulting array will have s^k runs
createSaturated
returns an s^k times (s^k-1)/(s-1) matrix (saturated regular OA with s-level columns)
For many situations, the saturated fractions produced by this function are not the best choice
for direct use in experimentation, because they heavily confound main effects with interactions.
If not all columns are needed, using the last m columns may yield better results
than using the first m columns.
If possible, stronger OAs from other sources can be used,
e.g. from package FrF2 for 2-level factors or from package DoE.base for
factors with more than 2 levels.
createSaturated(3, k=3) ## 27 x 13 array in 3 levels
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
#> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [2,] 1 0 0 0 0 1 1 1 1 1 1 1 1
#> [3,] 2 0 0 0 0 2 2 2 2 2 2 2 2
#> [4,] 0 1 0 1 1 0 0 1 1 1 2 2 2
#> [5,] 1 1 0 1 1 1 1 2 2 2 0 0 0
#> [6,] 2 1 0 1 1 2 2 0 0 0 1 1 1
#> [7,] 0 2 0 2 2 0 0 2 2 2 1 1 1
#> [8,] 1 2 0 2 2 1 1 0 0 0 2 2 2
#> [9,] 2 2 0 2 2 2 2 1 1 1 0 0 0
#> [10,] 0 0 1 1 2 1 2 0 1 2 0 1 2
#> [11,] 1 0 1 1 2 2 0 1 2 0 1 2 0
#> [12,] 2 0 1 1 2 0 1 2 0 1 2 0 1
#> [13,] 0 1 1 2 0 1 2 1 2 0 2 0 1
#> [14,] 1 1 1 2 0 2 0 2 0 1 0 1 2
#> [15,] 2 1 1 2 0 0 1 0 1 2 1 2 0
#> [16,] 0 2 1 0 1 1 2 2 0 1 1 2 0
#> [17,] 1 2 1 0 1 2 0 0 1 2 2 0 1
#> [18,] 2 2 1 0 1 0 1 1 2 0 0 1 2
#> [19,] 0 0 2 2 1 2 1 0 2 1 0 2 1
#> [20,] 1 0 2 2 1 0 2 1 0 2 1 0 2
#> [21,] 2 0 2 2 1 1 0 2 1 0 2 1 0
#> [22,] 0 1 2 0 2 2 1 1 0 2 2 1 0
#> [23,] 1 1 2 0 2 0 2 2 1 0 0 2 1
#> [24,] 2 1 2 0 2 1 0 0 2 1 1 0 2
#> [25,] 0 2 2 1 0 2 1 2 1 0 1 0 2
#> [26,] 1 2 2 1 0 0 2 0 2 1 2 1 0
#> [27,] 2 2 2 1 0 1 0 1 0 2 0 2 1