Functions for fast calculation of GWLP
Functions needed for fast calculation of GWLP using the formulae from Xu and Wu (2001)
GWLP(design, ...) ## S3 method for class 'design' GWLP(design, kmax=design.info(design)$nfactors, attrib.out=FALSE, with.blocks = FALSE, digits = NULL, ...) ## Default S3 method: 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)
design |
a design, not necessarily of class |
kmax |
the maximum word length requested |
attrib.out |
the detail added to the output (see Value section) |
with.blocks |
if |
digits |
the number of decimals to round to; |
n |
an integer number |
k |
an integer number |
x |
an integer number |
q |
an integer number |
c1 |
a design row |
c2 |
a design row |
xx |
a design, not necessarily of class |
code |
a design, not necessarily of class |
levm |
an object returned by function |
dists |
the BSep element of an outcome object from |
nmax |
set to |
Bprime |
an outcome object from |
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.
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).
This package is currently under intensive development. Substantial changes are to be expected in the near future.
Hongquan Xu, Ulrike Groemping
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
GWLP(L18) GWLP(L18, attrib.out=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.