An OSOA in ns runs of strength 2* (s^3 levels) or 2+ (s^2 levels) is created from an OA(n,m,s,2).
OSOAs(
oa,
el = 3,
m = NULL,
noptim.rounds = 1,
noptim.repeats = 1,
optimize = TRUE,
dmethod = "manhattan",
p = 50
)
matrix or data.frame that contains an ingoing symmetric OA. Levels must be denoted as 0 to s-1 or as 1 to s.
the exponent of the number of levels, el=3
yields a
strength 2* OSOA in s^3 levels, el=2
a strength 2+ OSOA in s^2 levels
the desired number of columns of the resulting array; odd values of
m will be reduced by one, so specify the next largest even m, if you need an
odd number of columns (the function will do so, if possible; if m=NULL
,
the maximum possible value is used.
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 function implements the algorithms proposed by Zhou and Tang 2018 (s^2 levels) or Li, Liu and Yang 2021 (s^3 levels). Both are enhanced with the modification for matrix A by Groemping 2022. Level permutations are optimized using an adaptation of the algorithm by Weng (2014).
Suitable OAs for argument oa
can e.g. be constructed with OA creation functions
from package lhs or can be obtained
from arrays listed in R package DoE.base
For full detail, see SOAs-package
.
Groemping (2023a)
Li, Liu and Yang (2021)
Weng (2014)
Zhou and Tang (2019)
## run with optimization for actual use!
## 54 runs with seven 9-level columns
OSOAs(DoE.base::L18[,3:8], el=2, optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0 0 0 0 0 0
#> [2,] 4 4 4 4 4 4
#> [3,] 8 8 8 8 8 8
#> [4,] 0 0 4 4 8 8
#> [5,] 4 4 8 8 0 0
#> [6,] 8 8 0 0 4 4
#> [7,] 0 4 0 8 4 8
#> [8,] 4 8 4 0 8 0
#> [9,] 8 0 8 4 0 4
#> [10,] 0 8 8 4 4 0
#> [11,] 4 0 0 8 8 4
#> [12,] 8 4 4 0 0 8
#> [13,] 0 4 8 0 8 4
#> [14,] 4 8 0 4 0 8
#> [15,] 8 0 4 8 4 0
#> [16,] 0 8 4 8 0 4
#> [17,] 4 0 8 0 4 8
#> [18,] 8 4 0 4 8 0
#> [19,] 3 3 3 3 3 3
#> [20,] 7 7 7 7 7 7
#> [21,] 2 2 2 2 2 2
#> [22,] 3 3 7 7 2 2
#> [23,] 7 7 2 2 3 3
#> [24,] 2 2 3 3 7 7
#> [25,] 3 7 3 2 7 2
#> [26,] 7 2 7 3 2 3
#> [27,] 2 3 2 7 3 7
#> [28,] 3 2 2 7 7 3
#> [29,] 7 3 3 2 2 7
#> [30,] 2 7 7 3 3 2
#> [31,] 3 7 2 3 2 7
#> [32,] 7 2 3 7 3 2
#> [33,] 2 3 7 2 7 3
#> [34,] 3 2 7 2 3 7
#> [35,] 7 3 2 3 7 2
#> [36,] 2 7 3 7 2 3
#> [37,] 6 6 6 6 6 6
#> [38,] 1 1 1 1 1 1
#> [39,] 5 5 5 5 5 5
#> [40,] 6 6 1 1 5 5
#> [41,] 1 1 5 5 6 6
#> [42,] 5 5 6 6 1 1
#> [43,] 6 1 6 5 1 5
#> [44,] 1 5 1 6 5 6
#> [45,] 5 6 5 1 6 1
#> [46,] 6 5 5 1 1 6
#> [47,] 1 6 6 5 5 1
#> [48,] 5 1 1 6 6 5
#> [49,] 6 1 5 6 5 1
#> [50,] 1 5 6 1 6 5
#> [51,] 5 6 1 5 1 6
#> [52,] 6 5 1 5 6 1
#> [53,] 1 6 5 6 1 5
#> [54,] 5 1 6 1 5 6
#> OSOA, strength 2+
## 54 runs with six 27-level columns
OSOAs(DoE.base::L18[,3:8], el=3, optimize=FALSE)
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0 2 0 2 0 2
#> [2,] 13 13 13 13 13 13
#> [3,] 26 24 26 24 26 24
#> [4,] 0 2 13 13 26 24
#> [5,] 13 13 26 24 0 2
#> [6,] 26 24 0 2 13 13
#> [7,] 1 14 2 26 14 25
#> [8,] 14 25 12 1 24 0
#> [9,] 24 0 25 12 1 14
#> [10,] 2 26 25 12 12 1
#> [11,] 12 1 2 26 25 12
#> [12,] 25 12 12 1 2 26
#> [13,] 1 14 24 0 25 12
#> [14,] 14 25 1 14 2 26
#> [15,] 24 0 14 25 12 1
#> [16,] 2 26 14 25 1 14
#> [17,] 12 1 24 0 14 25
#> [18,] 25 12 1 14 24 0
#> [19,] 10 10 10 10 10 10
#> [20,] 23 21 23 21 23 21
#> [21,] 6 8 6 8 6 8
#> [22,] 10 10 23 21 6 8
#> [23,] 23 21 6 8 10 10
#> [24,] 6 8 10 10 23 21
#> [25,] 11 22 9 7 21 6
#> [26,] 21 6 22 9 7 11
#> [27,] 7 11 8 23 11 22
#> [28,] 9 7 8 23 22 9
#> [29,] 22 9 9 7 8 23
#> [30,] 8 23 22 9 9 7
#> [31,] 11 22 7 11 8 23
#> [32,] 21 6 11 22 9 7
#> [33,] 7 11 21 6 22 9
#> [34,] 9 7 21 6 11 22
#> [35,] 22 9 7 11 21 6
#> [36,] 8 23 11 22 7 11
#> [37,] 20 18 20 18 20 18
#> [38,] 3 5 3 5 3 5
#> [39,] 16 16 16 16 16 16
#> [40,] 20 18 3 5 16 16
#> [41,] 3 5 16 16 20 18
#> [42,] 16 16 20 18 3 5
#> [43,] 18 3 19 15 4 17
#> [44,] 4 17 5 20 17 19
#> [45,] 17 19 15 4 18 3
#> [46,] 19 15 15 4 5 20
#> [47,] 5 20 19 15 15 4
#> [48,] 15 4 5 20 19 15
#> [49,] 18 3 17 19 15 4
#> [50,] 4 17 18 3 19 15
#> [51,] 17 19 4 17 5 20
#> [52,] 19 15 4 17 18 3
#> [53,] 5 20 17 19 4 17
#> [54,] 15 4 18 3 17 19
#> OSOA, strength 2*
## 81 runs with four 9-level columns
OSOAs(DoE.base::L27.3.4, el=2, optimize=FALSE)
#> [,1] [,2] [,3] [,4]
#> [1,] 0 0 0 0
#> [2,] 0 4 4 4
#> [3,] 0 8 8 8
#> [4,] 0 0 4 8
#> [5,] 0 4 8 0
#> [6,] 0 8 0 4
#> [7,] 0 0 8 4
#> [8,] 0 4 0 8
#> [9,] 0 8 4 0
#> [10,] 4 0 4 4
#> [11,] 4 4 8 8
#> [12,] 4 8 0 0
#> [13,] 4 0 8 0
#> [14,] 4 4 0 4
#> [15,] 4 8 4 8
#> [16,] 4 0 0 8
#> [17,] 4 4 4 0
#> [18,] 4 8 8 4
#> [19,] 8 0 8 8
#> [20,] 8 4 0 0
#> [21,] 8 8 4 4
#> [22,] 8 0 0 4
#> [23,] 8 4 4 8
#> [24,] 8 8 8 0
#> [25,] 8 0 4 0
#> [26,] 8 4 8 4
#> [27,] 8 8 0 8
#> [28,] 3 3 3 3
#> [29,] 3 7 7 7
#> [30,] 3 2 2 2
#> [31,] 3 3 7 2
#> [32,] 3 7 2 3
#> [33,] 3 2 3 7
#> [34,] 3 3 2 7
#> [35,] 3 7 3 2
#> [36,] 3 2 7 3
#> [37,] 7 3 7 7
#> [38,] 7 7 2 2
#> [39,] 7 2 3 3
#> [40,] 7 3 2 3
#> [41,] 7 7 3 7
#> [42,] 7 2 7 2
#> [43,] 7 3 3 2
#> [44,] 7 7 7 3
#> [45,] 7 2 2 7
#> [46,] 2 3 2 2
#> [47,] 2 7 3 3
#> [48,] 2 2 7 7
#> [49,] 2 3 3 7
#> [50,] 2 7 7 2
#> [51,] 2 2 2 3
#> [52,] 2 3 7 3
#> [53,] 2 7 2 7
#> [54,] 2 2 3 2
#> [55,] 6 6 6 6
#> [56,] 6 1 1 1
#> [57,] 6 5 5 5
#> [58,] 6 6 1 5
#> [59,] 6 1 5 6
#> [60,] 6 5 6 1
#> [61,] 6 6 5 1
#> [62,] 6 1 6 5
#> [63,] 6 5 1 6
#> [64,] 1 6 1 1
#> [65,] 1 1 5 5
#> [66,] 1 5 6 6
#> [67,] 1 6 5 6
#> [68,] 1 1 6 1
#> [69,] 1 5 1 5
#> [70,] 1 6 6 5
#> [71,] 1 1 1 6
#> [72,] 1 5 5 1
#> [73,] 5 6 5 5
#> [74,] 5 1 6 6
#> [75,] 5 5 1 1
#> [76,] 5 6 6 1
#> [77,] 5 1 1 5
#> [78,] 5 5 5 6
#> [79,] 5 6 1 6
#> [80,] 5 1 5 1
#> [81,] 5 5 6 5
#> OSOA, strength 3-
## An OA with 9-level factors (L81.9.10)
## has complete balance in 2D,
## however does not achieve 3D projection for
## all four collapsed triples
## It is up to the user to decide what is more important.
## I would go for the OA.
## 81 runs with four 27-level columns
OSOAs(DoE.base::L27.3.4, el=3, optimize=FALSE)
#> [,1] [,2] [,3] [,4]
#> [1,] 0 2 0 2
#> [2,] 1 14 13 13
#> [3,] 2 26 26 24
#> [4,] 0 2 14 25
#> [5,] 1 14 24 0
#> [6,] 2 26 1 14
#> [7,] 0 2 25 12
#> [8,] 1 14 2 26
#> [9,] 2 26 12 1
#> [10,] 12 1 13 13
#> [11,] 13 13 26 24
#> [12,] 14 25 0 2
#> [13,] 12 1 24 0
#> [14,] 13 13 1 14
#> [15,] 14 25 14 25
#> [16,] 12 1 2 26
#> [17,] 13 13 12 1
#> [18,] 14 25 25 12
#> [19,] 24 0 26 24
#> [20,] 25 12 0 2
#> [21,] 26 24 13 13
#> [22,] 24 0 1 14
#> [23,] 25 12 14 25
#> [24,] 26 24 24 0
#> [25,] 24 0 12 1
#> [26,] 25 12 25 12
#> [27,] 26 24 2 26
#> [28,] 10 10 10 10
#> [29,] 11 22 23 21
#> [30,] 9 7 6 8
#> [31,] 10 10 21 6
#> [32,] 11 22 7 11
#> [33,] 9 7 11 22
#> [34,] 10 10 8 23
#> [35,] 11 22 9 7
#> [36,] 9 7 22 9
#> [37,] 22 9 23 21
#> [38,] 23 21 6 8
#> [39,] 21 6 10 10
#> [40,] 22 9 7 11
#> [41,] 23 21 11 22
#> [42,] 21 6 21 6
#> [43,] 22 9 9 7
#> [44,] 23 21 22 9
#> [45,] 21 6 8 23
#> [46,] 7 11 6 8
#> [47,] 8 23 10 10
#> [48,] 6 8 23 21
#> [49,] 7 11 11 22
#> [50,] 8 23 21 6
#> [51,] 6 8 7 11
#> [52,] 7 11 22 9
#> [53,] 8 23 8 23
#> [54,] 6 8 9 7
#> [55,] 20 18 20 18
#> [56,] 18 3 3 5
#> [57,] 19 15 16 16
#> [58,] 20 18 4 17
#> [59,] 18 3 17 19
#> [60,] 19 15 18 3
#> [61,] 20 18 15 4
#> [62,] 18 3 19 15
#> [63,] 19 15 5 20
#> [64,] 5 20 3 5
#> [65,] 3 5 16 16
#> [66,] 4 17 20 18
#> [67,] 5 20 17 19
#> [68,] 3 5 18 3
#> [69,] 4 17 4 17
#> [70,] 5 20 19 15
#> [71,] 3 5 5 20
#> [72,] 4 17 15 4
#> [73,] 17 19 16 16
#> [74,] 15 4 20 18
#> [75,] 16 16 3 5
#> [76,] 17 19 18 3
#> [77,] 15 4 4 17
#> [78,] 16 16 17 19
#> [79,] 17 19 5 20
#> [80,] 15 4 15 4
#> [81,] 16 16 19 15
#> OSOA, strength 3