DoE.base (version 1.1-3)

GWLP: Functions for fast calculation of GWLP

Description

Functions needed for fast calculation of GWLP using the formulae from Xu and Wu (2001)

Usage

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)

Arguments

design

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)

kmax

the maximum word length requested

attrib.out

the detail added to the output (see Value section)

with.blocks

if TRUE, the block column contributes to the GWLP, otherwise it does not

digits

the number of decimals to round to; NULL prevents rounding

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 design

code

a design, not necessarily of class design

levm

an object returned by function levelmix

dists

the BSep element of an outcome object from distDistmix, analogous to the B_j1_j2 of p.1072 of Xu and Wu 2001

nmax

set to kmax in calls by other functions

Bprime

an outcome object from Bprime, the MacWilliams transform of the distance distribution

Value

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

Details

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.

References

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

See Also lengths

Examples

Run this code
# NOT RUN {
GWLP(L18)
GWLP(L18, attrib.out=TRUE)
# }

Run the code above in your browser using DataLab