R/OSOAs_hadamard.R
OSOAs_hadamard.Rd
A Hadamard matrix in k runs is used for creating an OSOA in n=2k runs for at most m=k-2 columns (8-level) or m=k-1 columns (4-level).
OSOAs_hadamard(
m = NULL,
n = NULL,
el = 3,
noptim.rounds = 1,
noptim.repeats = 1,
optimize = TRUE,
dmethod = "manhattan",
p = 50
)
the number of columns to be created;
if n
is also given, m
must be compatible with it; at present, m
can be at most 98.
the number of runs to be created; n
must be a multiple of 8 and can (at present) be at most 200;
if m
is also given, n
must be compatible with it.
exponent for 2, can be 2 or 3: the OSOA will have columns with
2^el
(4 or 8) levels
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
At least one of m
or n
must be provided. For el=2
,
Zhou and Tang (2019) strength 3- designs are created, for el=3
strength
3 designs by Li, Liu and Yang (2021).
Li et al.'s creation of the matrix A has been enhanced by using a column specific
fold-over, which is beneficial for the space-filling properties (see Groemping 2022).
For full detail, see SOAs-package
.
Groemping (2023a)
Li, Liu and Yang (2021)
Weng (2014)
Zhou and Tang (2019)
dim(OSOAs_hadamard(9, optimize=FALSE)) ## 9 8-level factors in 24 runs
#> [1] 24 9
dim(OSOAs_hadamard(n=16, optimize=FALSE)) ## 6 8-level factors in 16 runs
#> [1] 16 6
OSOAs_hadamard(n=24, m=6, optimize=FALSE) ## 6 8-level factors in 24 runs
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 7 6 1 7 7 6
#> [2,] 1 7 6 0 7 6
#> [3,] 6 0 7 6 1 7
#> [4,] 1 7 1 7 6 0
#> [5,] 0 1 6 0 7 6
#> [6,] 0 1 1 7 1 7
#> [7,] 6 0 0 1 6 0
#> [8,] 7 6 0 1 1 7
#> [9,] 7 6 6 0 0 1
#> [10,] 1 7 7 6 0 1
#> [11,] 6 0 7 6 6 0
#> [12,] 0 1 0 1 0 1
#> [13,] 2 3 4 2 2 3
#> [14,] 4 2 3 5 2 3
#> [15,] 3 5 2 3 4 2
#> [16,] 4 2 4 2 3 5
#> [17,] 5 4 3 5 2 3
#> [18,] 5 4 4 2 4 2
#> [19,] 3 5 5 4 3 5
#> [20,] 2 3 5 4 4 2
#> [21,] 2 3 3 5 5 4
#> [22,] 4 2 2 3 5 4
#> [23,] 3 5 2 3 3 5
#> [24,] 5 4 5 4 5 4
#> OSOA, strength 3
## (though 10 would be possible)
dim(OSOAs_hadamard(m=35, optimize=FALSE)) ## 35 8-level factors in 80 runs
#> [1] 80 35