ffDesMatrix: Full or fractional factorial design matrix generation
Description
The function generates the design matrix provided the
number of 2-levels design factors and defining relations.
Usage
ffDesMatrix(k, gen = NULL)
Arguments
k
numeric. The number of 2-levels design factors in the designs.
gen
list. If NULL (default) a full factorial design is
generated. Otherwise, each component of the list is a numeric vector of
corresponding to each of the defining relations used to compose the
design. See Details
Value
The function returns a 2-levels design matrix with k columns.
Details
A defining relation is declared by a vector where the first entry
corresponds to the left hand side (LHS) of the defining
equation. For example, if k=5, and gen=list(c(-5,1,2,3,4)),
then the defining equation is $-5=1*2*3*4$. A full 2-levels (-1,1)
factorial design is generated. For each defining relation the LHS column
is replaced by the corresponding columns product. At the end repeated
runs are removed from the matrix.