Functions needed for fast calculation of GWLP using the formulae from Xu and Wu (2001)
GWLP(design, ...)
# S3 method for design
GWLP(design, kmax=design.info(design)$nfactors,
attrib.out=FALSE, with.blocks = FALSE, digits = NULL, ...)
# S3 method for default
GWLP(design, kmax=ncol(design), attrib.out=FALSE, digits = NULL, ...)
Choose(n, k)
Kraw(k,x,n,q)
ham(c1, c2)
levels.no(xx)
levelmix(xx)
distDistmix(code, levm)
Bprime(dists, nmax=5)
dualDistmix(Bprime, nmax=5)
a design, not necessarily of class design
;
class design properties are exploited by using only factor columns
(or factor and block columns, if with.blocks
is TRUE
)
the maximum word length requested
the detail added to the output (see Value section)
if TRUE
, the block column contributes to
the GWLP, otherwise it does not
the number of decimals to round to; NULL
prevents rounding
an integer number
an integer number
an integer number
an integer number
a design row
a design row
a design, not necessarily of class design
a design, not necessarily of class design
an object returned by function levelmix
the BSep element of an outcome object from distDistmix
,
analogous to the B_j1_j2 of p.1072 of Xu and Wu 2001
set to kmax
in calls by other functions
an outcome object from Bprime
, the MacWilliams transform
of the distance distribution
Only function GWLP
is intended for direct use.
The GWLP
methods output a named vector with the numbers of generalized
words of lengths zero to kmax
. If attrib.out
is TRUE
,
this vector comes with the attributes B
and levels.info
,
the latter documenting the level situation of the design, the former
the distance distribution B (Xu and Wu 2001).
Function GWLP
is intended for direct use, the others are not.
Function GWLP
is much faster but also more inaccurate than the
function lengths
, which calculates numbers of words
for lengths 2 to 5 only. Note, however, that function lengths
can be faster for designs with very many rows.
If a design factor contains only some of the intended levels,
design
must be a data frame, and the factor must be an R
factor with the complete set of levels specified,
in order to make function GWLP
aware of the missing levels.
Function ham
calculates the Hamming distance, function Kraw
the Krawtchouk polynomials, function Choose
differs from the base
function choose
by treatment of negative values n
,
functions levels.no
and levelmix
are utilities providing the
level information on the design xx
.
The functions distDistmix
, Bprime
and dualDistmix
implement formulae from Xu and Wu (2001) for the distance distribution,
its MacWilliams transform and the calculation of GWLP from the latter.
Xu, H.-Q. and Wu, C.F.J. (2001). Generalized minimum aberration for asymmetrical fractional factorial designs. Annals of Statistics 29, 1066--1077.
See Also lengths
# NOT RUN {
GWLP(L18)
GWLP(L18, attrib.out=TRUE)
# }
Run the code above in your browser using DataLab