R/SOAs_8level.R
SOAs_8level.Rdcreates strength 3 or 3+ SOAs with 8-level factors in 2^k runs, k at least 4. These SOAs have at least some more balance than guaranteed by strength 3.
SOAs_8level(
n,
m = NULL,
constr = "ShiTang_alphabeta",
noptim.rounds = 1,
noptim.repeats = 1,
optimize = TRUE,
dmethod = "manhattan",
p = 50
)run size of the SOA; power of 2, at least 16
number of colums; at most 5n/16 for constr="ShiTang_alpha" (exception: only 9 for n=32),
at most n/4 for constr="ShiTang_alphabeta"; for m=NULL,
defaults are m=5n/16 and m=n/4-1, respectively; the latter yields
strength 3+.
construction method. Must be one of "ShiTang_alphabeta", "ShiTang_alpha".
See Details section
the number of optimization rounds for each independent restart
the number of independent restarts of optimizations with noptim.rounds rounds each
logical: should space filling be optimized by level permutations?
distance method for phi_p, "manhattan" (default) or "euclidean"
p for phi_p (the larger, the closer to maximin distance)
matrix of class SOA with the attributes that are listed below. All attributes can be accessed using function attributes, or individual attributes can be accessed using function attr. These are the attributes:
the type of array (SOA or OSOA)
character string that gives the strength
the phi_p value (smaller=better)
logical indicating whether optimization was applied
matrix that lists the id numbers of the permutations used
optional element, when optimization was conducted: the overall permutation list to which the numbers in permlist refer
the call that created the object
The construction is implemented as described in Groemping (2023a).
The 8-level SOAs created by this construction have strength 3 and at least the additional property alpha, which means that all pairs of columns achieve perfect 4x4 balance, if consecutive level pairs (01, 23, 45, 67) are collapsed.
The "ShiTang_alphabeta" construction additionally yields perfect 4x2x2 balance, if one column is collapsed to 4 levels, while two further columns are collapsed to 2 levels (0123 vs 4567). with m = n/4 columns, the "ShiTang_alphabeta" construction has a single pair of correlated columns, all other columns are uncorrelated, due to a modification of Shi and Tang's column allocation that was proposed in Groemping (2023a).
For m <= n/4 - 1, the "ShiTang_alphabeta" construction also yields perfect balance for 8x2 projections in 2D (i.e. if one original column with another column collapsed to two levels). Thus, it yields all strength 4 properties in 2D and 3D, which is called strength 3+. Furthermore, Groemping (2023a) proposed an improved choice of columns for matrix C that implies orthogonal columns in this case.
## use with optimization for actually using such designs
## n/4 - 1 = 7 columns, strength 3+
SOAs_8level(32, optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] 0 0 0 0 0 0 0
#> [2,] 7 2 5 2 5 0 7
#> [3,] 2 5 7 0 2 5 7
#> [4,] 5 7 2 2 7 5 0
#> [5,] 2 2 0 5 7 7 5
#> [6,] 5 0 5 7 2 7 2
#> [7,] 0 7 7 5 5 2 2
#> [8,] 7 5 2 7 0 2 5
#> [9,] 2 2 2 2 2 2 2
#> [10,] 5 0 7 0 7 2 5
#> [11,] 0 7 5 2 0 7 5
#> [12,] 7 5 0 0 5 7 2
#> [13,] 0 0 2 7 5 5 7
#> [14,] 7 2 7 5 0 5 0
#> [15,] 2 5 5 7 7 0 0
#> [16,] 5 7 0 5 2 0 7
#> [17,] 4 4 4 4 4 4 4
#> [18,] 3 6 1 6 1 4 3
#> [19,] 6 1 3 4 6 1 3
#> [20,] 1 3 6 6 3 1 4
#> [21,] 6 6 4 1 3 3 1
#> [22,] 1 4 1 3 6 3 6
#> [23,] 4 3 3 1 1 6 6
#> [24,] 3 1 6 3 4 6 1
#> [25,] 6 6 6 6 6 6 6
#> [26,] 1 4 3 4 3 6 1
#> [27,] 4 3 1 6 4 3 1
#> [28,] 3 1 4 4 1 3 6
#> [29,] 4 4 6 3 1 1 3
#> [30,] 3 6 3 1 4 1 4
#> [31,] 6 1 1 3 3 4 4
#> [32,] 1 3 4 1 6 4 3
#> OSOA, strength 3+
## n/4 = 8 columns, strength 3 with alpha and beta
SOAs_8level(32, m=8, optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 0 0 0 0 0 0 0 0
#> [2,] 1 7 2 5 2 5 0 7
#> [3,] 1 2 5 7 0 2 5 7
#> [4,] 0 5 7 2 2 7 5 0
#> [5,] 1 2 2 0 5 7 7 5
#> [6,] 0 5 0 5 7 2 7 2
#> [7,] 0 0 7 7 5 5 2 2
#> [8,] 1 7 5 2 7 0 2 5
#> [9,] 2 2 2 2 2 2 2 2
#> [10,] 3 5 0 7 0 7 2 5
#> [11,] 3 0 7 5 2 0 7 5
#> [12,] 2 7 5 0 0 5 7 2
#> [13,] 3 0 0 2 7 5 5 7
#> [14,] 2 7 2 7 5 0 5 0
#> [15,] 2 2 5 5 7 7 0 0
#> [16,] 3 5 7 0 5 2 0 7
#> [17,] 4 4 4 4 4 4 4 4
#> [18,] 5 3 6 1 6 1 4 3
#> [19,] 5 6 1 3 4 6 1 3
#> [20,] 4 1 3 6 6 3 1 4
#> [21,] 5 6 6 4 1 3 3 1
#> [22,] 4 1 4 1 3 6 3 6
#> [23,] 4 4 3 3 1 1 6 6
#> [24,] 5 3 1 6 3 4 6 1
#> [25,] 6 6 6 6 6 6 6 6
#> [26,] 7 1 4 3 4 3 6 1
#> [27,] 7 4 3 1 6 4 3 1
#> [28,] 6 3 1 4 4 1 3 6
#> [29,] 7 4 4 6 3 1 1 3
#> [30,] 6 3 6 3 1 4 1 4
#> [31,] 6 6 1 1 3 3 4 4
#> [32,] 7 1 3 4 1 6 4 3
#> SOA, strength 3
## 9 columns (special case n=32), strength 3 with alpha
SOAs_8level(32, constr="ShiTang_alpha", optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
#> [1,] 0 0 0 0 0 0 0 0 0
#> [2,] 4 0 2 0 2 6 6 4 6
#> [3,] 1 5 1 3 1 7 5 5 3
#> [4,] 5 5 3 3 3 1 3 1 5
#> [5,] 0 2 4 2 2 4 0 2 4
#> [6,] 4 2 6 2 0 2 6 6 2
#> [7,] 1 7 5 1 3 3 5 7 7
#> [8,] 5 7 7 1 1 5 3 3 1
#> [9,] 3 1 3 5 1 3 5 3 5
#> [10,] 7 1 1 5 3 5 3 7 3
#> [11,] 2 4 2 6 0 4 0 6 6
#> [12,] 6 4 0 6 2 2 6 2 0
#> [13,] 3 3 7 7 3 7 5 1 1
#> [14,] 7 3 5 7 1 1 3 5 7
#> [15,] 2 6 6 4 2 0 0 4 2
#> [16,] 6 6 4 4 0 6 6 0 4
#> [17,] 2 2 0 0 4 2 2 4 4
#> [18,] 6 2 2 0 6 4 4 0 2
#> [19,] 3 7 1 3 5 5 7 1 7
#> [20,] 7 7 3 3 7 3 1 5 1
#> [21,] 2 0 4 2 6 6 2 6 0
#> [22,] 6 0 6 2 4 0 4 2 6
#> [23,] 3 5 5 1 7 1 7 3 3
#> [24,] 7 5 7 1 5 7 1 7 5
#> [25,] 1 3 3 5 5 1 7 7 1
#> [26,] 5 3 1 5 7 7 1 3 7
#> [27,] 0 6 2 6 4 6 2 2 2
#> [28,] 4 6 0 6 6 0 4 6 4
#> [29,] 1 1 7 7 7 5 7 5 5
#> [30,] 5 1 5 7 5 3 1 1 3
#> [31,] 0 4 6 4 6 2 2 0 6
#> [32,] 4 4 4 4 4 4 4 4 0
#> SOA, strength 3
## 5*n/16 = 5 columns, strength 3 with alpha
SOAs_8level(16, constr="ShiTang_alpha", optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0 0 0 0 0
#> [2,] 4 3 3 1 7
#> [3,] 1 4 2 2 4
#> [4,] 5 7 1 3 3
#> [5,] 2 0 4 2 6
#> [6,] 6 3 7 3 1
#> [7,] 3 4 6 0 2
#> [8,] 7 7 5 1 5
#> [9,] 2 2 0 4 4
#> [10,] 6 1 3 5 3
#> [11,] 3 6 2 6 0
#> [12,] 7 5 1 7 7
#> [13,] 0 2 4 6 2
#> [14,] 4 1 7 7 5
#> [15,] 1 6 6 4 6
#> [16,] 5 5 5 5 1
#> SOA, strength 3