R/SOAs.R
SOAs.Rd
takes an OA(n,m,s,t) and creates an SOA(n,m',s^t',t') with t'<=t.
SOAs(
oa,
t = 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 strength the SOA should have, can be 2, 3, 4, or 5. Must not
be larger than the strength of oa
, but can be smaller. The resulting SOA will have s^t levels
the requested number of columns (see details for permitted numbers of columns)
the number of optimization rounds for each independent restart
the number of independent restarts of optimizations with noptim.rounds
rounds each
logical, default TRUE
; if FALSE
, suppresses optimization
method for the calculation of 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 resulting SOA will have at most m' columns in s^t levels and will be of
strength t. m'(m, t) is a function of the number of columns of oa
(denoted as m) and the strength t: m'(m,2)=m, m'(m,3)=m-1, m'(m,4)=floor(m/2),
m'(m,5)=floor((m-1)/2).
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.
aus <- SOAs(DoE.base::L27.3.4, optimize=FALSE) ## t=3 is the default
dim(aus)
#> [1] 27 3
soacheck2D(aus, s=3, el=3) ## check for 2*
#> [1] TRUE
soacheck3D(aus, s=3, el=3) ## check for 3
#> [1] TRUE
aus2 <- SOAs(DoE.base::L27.3.4, t=2, optimize=FALSE)
## t can be smaller than the array strength
## --> more columns with fewer levels each
dim(aus2)
#> [1] 27 4
soacheck2D(aus2, s=3, el=2, t=2) # check for 2
#> [1] TRUE
soacheck3D(aus2, s=3, el=2) # t=3 is the default (check for 3-)
#> [1] TRUE