SOAs: function to create SOAs of strength t with the GOA...

View source: R/SOAs.R

SOAsR Documentation

function to create SOAs of strength t with the GOA construction by He and Tang.

Description

takes an OA(n,m,s,t) and creates an SOA(n,m',s^t',t') with t'<=t.

Usage

SOAs(
  oa,
  t = 3,
  m = NULL,
  noptim.rounds = 1,
  noptim.repeats = 1,
  optimize = TRUE,
  dmethod = "manhattan",
  p = 50
)

Arguments

oa

matrix or data.frame that contains an ingoing symmetric OA. Levels must be denoted as 0 to s-1 or as 1 to s.

t

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

m

the requested number of columns (see details for permitted numbers of columns)

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, default TRUE; if FALSE, suppresses optimization

dmethod

method for the calculation of phi_p, "manhattan" (default) or "euclidean"

p

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

Details

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.

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

Author(s)

Ulrike Groemping

References

For full detail, see SOAs-package.

He and Tang (2013)
Weng (2014)

Examples

aus <- SOAs(DoE.base::L27.3.4, optimize=FALSE)  ## t=3 is the default
dim(aus)
soacheck2D(aus, s=3, el=3) ## check for 2*
soacheck3D(aus, s=3, el=3) ## check for 3

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)
soacheck2D(aus2, s=3, el=2, t=2) # check for 2
soacheck3D(aus2, s=3, el=2)      # t=3 is the default (check for 3-)

SOAs documentation built on Aug. 11, 2023, 1:09 a.m.