Learn R Programming

SOAs (version 1.4)

OSOAs_hadamard: function to create a strength 3 OSOA with 8-level columns or a strength 3- OSOA with 4-level columns from a Hadamard matrix

Description

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).

Usage

OSOAs_hadamard(
  m = NULL,
  n = NULL,
  el = 3,
  noptim.rounds = 1,
  noptim.repeats = 1,
  optimize = TRUE,
  dmethod = "manhattan",
  p = 50
)

Value

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:

type

the type of array (SOA or OSOA)

strength

character string that gives the strength

phi_p

the phi_p value (smaller=better)

optimized

logical indicating whether optimization was applied

permpick

matrix that lists the id numbers of the permutations used

perms2pickfrom

optional element, when optimization was conducted: the overall permutation list to which the numbers in permlist refer

call

the call that created the object

Arguments

m

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.

n

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.

el

exponent for 2, can be 2 or 3: the OSOA will have columns with 2^el (4 or 8) levels

noptim.rounds

the number of optimization rounds for each independent restart

noptim.repeats

the number of independent restarts of optimizations with noptim.rounds rounds each

optimize

logical: should space filling be optimized by level permutations?

dmethod

distance method for phi_p, "manhattan" (default) or "euclidean"

p

p for phi_p (the larger, the closer to maximin distance)

Author

Ulrike Groemping

Details

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).

References

For full detail, see SOAs-package.

Groemping (2023a)
Li, Liu and Yang (2021)
Weng (2014)
Zhou and Tang (2019)

Examples

Run this code
dim(OSOAs_hadamard(9, optimize=FALSE))  ## 9 8-level factors in 24 runs
dim(OSOAs_hadamard(n=16, optimize=FALSE)) ## 6 8-level factors in 16 runs
OSOAs_hadamard(n=24, m=6, optimize=FALSE) ## 6 8-level factors in 24 runs
                                          ## (though 10 would be possible)
dim(OSOAs_hadamard(m=35, optimize=FALSE)) ## 35 8-level factors in 80 runs

Run the code above in your browser using DataLab