fracfact
Fractional factorial design
Syntax
X = fracfact(gen)
[X,conf]
= fracfact(gen)
[X,conf]
= fracfact(gen,Name,Value)
Description
X = fracfact(gen) creates
the two-level fractional factorial design defined by the generator gen.
[X,conf]
= fracfact(gen) returns a cell array
of character vectors containing the confounding pattern for the design.
Name,Value pair arguments.
Input ArgumentsgenEither a string array or cell array of character vectors where each element contains one
“word,” or a character array or string scalar consisting of
“words” separated by spaces. “Words” consist of
case-sensitive letters or groups of letters, where 'a'
represents value 1, 'b' represents
value 2, ..., 'A' represents value
27, ..., 'Z' represents value
52.
Each word defines how the corresponding factor’s levels
are defined as products of generators from a 2^K full-factorial
design. K is the number of letters of the alphabet
in gen.
Name-Value Pair Arguments
Specify optional
comma-separated pairs of Name,Value arguments. Name is
the argument name and Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN.'FactorNames'String array or cell array specifying the name for each factor.
Default:{'X1','X2',...}
'MaxInt'Positive integer setting the maximum level of interaction to
include in the confounding output.
Default:2
Output ArgumentsXThe two-level fractional factorial design. X is
a matrix of size N-by-P, where
N = 2^K, where K is
the number of letters of the alphabet in gen.
P is the number of words in gen.
Because X is a two-level design, the components
of X are ±1. For the meaning
of X, see Fractional Factorial Designs.
confCell array of character vectors containing the confounding pattern
for the design.
Examples
Generate a fractional factorial design for four variables, where
the fourth variable is the product of the first three:
x = fracfact('a b c abc')
x =
-1 -1 -1 -1
-1 -1 1 1
-1 1 -1 1
-1 1 1 -1
1 -1 -1 1
1 -1 1 -1
1 1 -1 -1
1 1 1 1
Find generators for a six-factor design that uses four factors
and achieves resolution IV using fracfactgen.
Use the result to specify the design:
generators = fracfactgen('a b c d e f',4, ... % 4 factors
4) % resolution 4
generators =
'a'
'b'
'c'
'd'
'bcd'
'acd'
x = fracfact(generators)
x =
-1 -1 -1 -1 -1 -1
-1 -1 -1 1 1 1
-1 -1 1 -1 1 1
-1 -1 1 1 -1 -1
-1 1 -1 -1 1 -1
-1 1 -1 1 -1 1
-1 1 1 -1 -1 1
-1 1 1 1 1 -1
1 -1 -1 -1 -1 1
1 -1 -1 1 1 -1
1 -1 1 -1 1 -1
1 -1 1 1 -1 1
1 1 -1 -1 1 1
1 1 -1 1 -1 -1
1 1 1 -1 -1 -1
1 1 1 1 1 1
References
[1] Box, G. E. P., W. G. Hunter, and J. S.
Hunter. Statistics for Experimenters. Hoboken,
NJ: Wiley-Interscience, 1978.
Introduced before R2006a