Chapter 6 Fractional factorial designs

The factorial designs we studied in Chapters 4 and 5 can involve a large number of treatments, for even a moderate number of factors (Table 6.1).

size <- data.frame(1:15, 2^(1:15))
knitr::kable(size, col.names = c("No. factors", "No. of trts"), caption = "Number of treatments in a $2^f$ factorial designs for different numbers, $f$, of factors.")
Table 6.1: Number of treatments in a \(2^f\) factorial designs for different numbers, \(f\), of factors.
No. factors No. of trts
1 2
2 4
3 8
4 16
5 32
6 64
7 128
8 256
9 512
10 1024
11 2048
12 4096
13 8192
14 16384
15 32768

For larger numbers of factors, resource constraints may mean it is not possible to run an experiment using all \(2^f\) treatments. Also, many degrees of freedom in these experiments are used to estimate high-order interactions. For example, in a \(2^5\) experiment, 16 degrees of freedom are used to estimate three-factor and higher interactions, half the size of the experiment. The principles of effect hierarchy and sparsity (Section 4.2) suggest this is probably wasteful.

We can select smaller experiments by using a subset, or fraction of the treatments of size \(2^{f-q}\):

  1. divide the treatments in subsets by confounding \(q\) factorial effects (and their products), as in blocking;

  2. only use one of the subsets in the experiment.

Example 6.1 Spring experiment (Wu and Hamada, 2009, ch. 5)

Consider an industrial experiment to investigate the effect of \(f=5\) factors on the unloaded height of a spring produced using a heat treatment. The five factors are described in Table 6.2.

factor.name <- c("Quench temperature (F)", "Heat temperature (F)", "Heating time (s)", 
                 "Transfer time (s)", "Hold-down time (s)")
low.level <- c("130-150", 1840, 23, 10, 2)
high.level <- c("150-170", 1880, 25, 12, 3)
spring.factors <- data.frame(factor = factor.name, low = low.level, high = high.level)
row.names(spring.factors) <- LETTERS[1:5]
knitr::kable(spring.factors, col.names = c("Factor", "Low level", "High level"), 
             align = c("l", "r", "r"), caption = "Spring experiment: factors and levels")
Table 6.2: Spring experiment: factors and levels
Factor Low level High level
A Quench temperature (F) 130-150 150-170
B Heat temperature (F) 1840 1880
C Heating time (s) 23 25
D Transfer time (s) 10 12
E Hold-down time (s) 2 3

Enough experimental units were available to perform \(n=16\) runs, which is one-half of the total number of treatments. We refer to this type of design as a one-half fractional replicate of the full factorial design, or a \(2^{5-1}\) fractional factorial design37.

The design was constructed by confounding \(q=1\) factorial effects with blocks, the interaction \(BCDE\) was chosen, and running just one of the two resulting subsets, see Table 6.3 where FrF2 is used to generate the design.

spring <- FrF2::FrF2(nruns = 16, nfactors = 5, generators = "BCD", randomize = F)
spring$height <- c(7.54, 7.20, 7.69, 7.63, 7.94, 7.40, 7.95, 7.62, 7.52, 7.52, 
                   7.63, 7.65, 7.79, 7.29, 8.07, 7.73)
knitr::kable(spring, caption = "Spring experiment: 16 run design.", align = rep("r", 6))
Table 6.3: Spring experiment: 16 run design.
A B C D E height
-1 -1 -1 -1 -1 7.54
1 -1 -1 -1 -1 7.20
-1 1 -1 -1 1 7.69
1 1 -1 -1 1 7.63
-1 -1 1 -1 1 7.94
1 -1 1 -1 1 7.40
-1 1 1 -1 -1 7.95
1 1 1 -1 -1 7.62
-1 -1 -1 1 1 7.52
1 -1 -1 1 1 7.52
-1 1 -1 1 -1 7.63
1 1 -1 1 -1 7.65
-1 -1 1 1 -1 7.79
1 -1 1 1 -1 7.29
-1 1 1 1 1 8.07
1 1 1 1 1 7.73

Clearly, using a subset of the treatments, we will no longer be able to estimate all the factorial effects (we have insufficient degrees of freedom). We have confounded the interaction \(BCDE\), and hence clearly the contrast coefficients for this effect will be constant in our design. We say the interaction \(BCDE\) is aliased with the mean, and we write this as \(I = BCDE\). This expression is called the defining relation, as knowledge of which factorial effects are aliased with the mean completely define the fractional factorial.

fac_to_numeric <- function(x) as.numeric(as.character(x))
BCDE <- fac_to_numeric(spring$B) * fac_to_numeric(spring$C) * 
  fac_to_numeric(spring$D) * fac_to_numeric(spring$E) 
BCDE
##  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

This removes one factorial effect from consideration, but we are still short on degrees of freedom. What are the other consequences of using a fractional factorial design?

As the contrast coefficients for the interaction \(BCDE\) are constant, the contrast coefficients for any pairs of factorial effects whose (hadamard) product form \(BCDE\) will be equal. For example, the contrast coefficient vectors for interactions \(BC\) and \(DE\) will be equal, as will the vectors for the main effect \(B\) and the interaction \(CDE\), and so on.

BC <- fac_to_numeric(spring$B) * fac_to_numeric(spring$C)
DE <- fac_to_numeric(spring$D) * fac_to_numeric(spring$E)
BC
DE
all.equal(BC, DE)
##  [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] TRUE
B <- fac_to_numeric(spring$B)
CDE <- fac_to_numeric(spring$C) * fac_to_numeric(spring$D) * fac_to_numeric(spring$E)
B
CDE
all.equal(B, CDE)
##  [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] TRUE

We say these factorial effects are aliased. From the defining relation, we can derive the complete aliasing scheme for a fractional factorial design. For the example,

\[\begin{align} I & = BCDE \\ A & = ABCDE \\ B & = CDE \\ C & = BDE \\ D & = BCE \\ E & = BCD \\ AB & = ACDE \\ AC & = ABDE \\ AD & = ABCE \\ AE & = ABCD \\ BC & = DE \\ BD & = CE \\ BE & = CD \\ ABC & = ADE \\ ABD & = ACE \\ ABE & = ACD \\ \end{align}\]

The aliasing scheme contains \(2^{f-q} = 2^{5-1} = 16\) “strings”, each one containing \(2^q = 2^1 = 2\) “words”. The design is not capable to distinguishing between factorial effects in the same alias string.

We can also generate this information using the aliases function from FrF2.

spring.lm <- lm(height ~ (.)^5, data = spring)
FrF2::aliases(spring.lm)
##               
##  A = A:B:C:D:E
##  B = C:D:E    
##  C = B:D:E    
##  D = B:C:E    
##  E = B:C:D    
##  A:B = A:C:D:E
##  A:C = A:B:D:E
##  A:D = A:B:C:E
##  A:E = A:B:C:D
##  B:C = D:E    
##  B:D = C:E    
##  B:E = C:D    
##  A:B:C = A:D:E
##  A:B:D = A:C:E
##  A:B:E = A:C:D

Definition 6.1 A regular \(2^{f-q}\)fractional factorial design is constructed by aliasing \(2^q-1\) factorial effects with the mean; \(q\) of these effects can be chosen independently, the others are formed via the hadamard product of the contrast coefficients for the \(q\) effects,

How do we chose the factorial effects to alias with the mean? As with blocking, we tend to choose higher-order effects, taking care when \(q>1\) not to inadvertently alias together lower-order effects (see later examples).

For Example 6.1, a slightly unusual defining relation was chosen. It would be more common to use \(I = ABCDE\), leading to the aliasing scheme:

\[\begin{align} I & = ABCDE \\ A & = BCDE \\ B & = ACDE \\ C & = ABDE \\ D & = ABCE \\ E & = ABCD \\ AB & = CDE \\ AC & = BDE \\ AD & = BCE \\ AE & = BCD \\ BC & = ADE \\ BD & = ACE \\ BE & = ACD \\ CD & = ABE \\ CE & = ABD \\ DE & = ABC \\ \end{align}\]

This defining relation results in main effects being aliased with four-factor interactions and, perhaps more importantly, no pairs of two-factor interactions aliased together. The original design from Example 6.1 might be used if factor \(A\) and its interactions were a priori thought likely to be important (two-factor interactions involving factor \(A\) are aliased with four-factor interactions).

6.1 Estimability and aliasing

Any factorial effect in an alias string is only estimable if all other effects in that string are assumed zero38. Wd can study this further by introducing the alias matrix.

Definition 6.2 Assume a linear data generating model

\[ \boldsymbol{y}= X_1\boldsymbol{\beta}_1 + X_2\boldsymbol{\beta}_2 + \boldsymbol{\varepsilon}\,, \] where \(\boldsymbol{y}\) is an \(n\)-vector of responses, \(X_1\) and \(X_2\) are \(n\times p_1\) and \(n\times p_2\) model matrices, respectively, with \(\boldsymbol{\beta}_1\) and \(\boldsymbol{\beta}_2\) corresponding \(p_1\)- and \(p_2\)-vectors of parameters and random errors \(\varepsilon ~ N(\boldsymbol{0}, I_n\sigma^2)\).

If the submodel

\[ \boldsymbol{y}= X_1\boldsymbol{\beta}_1 + \boldsymbol{\varepsilon}\,, \] is fitted to the response data, then \(\hat{\boldsymbol{\beta}}_1 = (X_1^{\mathrm{T}}X_1)^{-1}X_1^{\mathrm{T}}\boldsymbol{y}\), and \[\begin{align*} E(\hat{\boldsymbol{\beta}}_1) & = \boldsymbol{\beta}_1 + (X_1^{\mathrm{T}}X_1)^{-1}X_1^{\mathrm{T}}X_2\boldsymbol{\beta}_2 \\ & = \boldsymbol{\beta}_1 + A\boldsymbol{\beta}_2\,, \end{align*}\] where \(A = (X_1^{\mathrm{T}}X_1)^{-1}X_1^{\mathrm{T}}X_2\) is the alias matrix.

We also introduce an alternative definition of estimability.

Definition 6.3 A linear combination of parameters \(\boldsymbol{c}^{\mathrm{T}}\boldsymbol{\theta}\) is estimable if and only if there exists a linear combination of the responses \(\boldsymbol{a}^{\mathrm{T}}\boldsymbol{y}\) such that

\[ E(\boldsymbol{a}^{\mathrm{T}}\boldsymbol{y}) = c^{\mathrm{T}}\boldsymbol{\theta}\,. \]

Now assume that using a two-level fractional factorial design, we will estimate one factorial effect (equivalently, the corresponding regression coefficient) from each alias string. Then the \(A\) matrix will have entries 0, -1 or +1, depending on the defining relation of the fraction. Each regression parameter will be biased by the parameters corresponding to other factorial effects in the alias string. Hence, by Definition 6.3, each factorial effect is only estimable under the assumption that all other factorial effects in the alias string are zero.

For Example 6.1 we can generate the alias matrix using the alias function.

t(alias(spring.lm)$Complete)
##             A1:C1:D1 A1:C1:E1 A1:D1:E1 B1:C1:D1 B1:C1:E1 B1:D1:E1 C1:D1:E1
## (Intercept) 0        0        0        0        0        0        0       
## A1          0        0        0        0        0        0        0       
## B1          0        0        0        0        0        0        1       
## C1          0        0        0        0        0        1        0       
## D1          0        0        0        0        1        0        0       
## E1          0        0        0        1        0        0        0       
## A1:B1       0        0        0        0        0        0        0       
## A1:C1       0        0        0        0        0        0        0       
## A1:D1       0        0        0        0        0        0        0       
## A1:E1       0        0        0        0        0        0        0       
## B1:C1       0        0        0        0        0        0        0       
## B1:D1       0        0        0        0        0        0        0       
## B1:E1       0        0        0        0        0        0        0       
## A1:B1:C1    0        0        1        0        0        0        0       
## A1:B1:D1    0        1        0        0        0        0        0       
## A1:B1:E1    1        0        0        0        0        0        0       
##             A1:B1:C1:D1 A1:B1:C1:E1 A1:B1:D1:E1 A1:C1:D1:E1 B1:C1:D1:E1
## (Intercept) 0           0           0           0           1          
## A1          0           0           0           0           0          
## B1          0           0           0           0           0          
## C1          0           0           0           0           0          
## D1          0           0           0           0           0          
## E1          0           0           0           0           0          
## A1:B1       0           0           0           1           0          
## A1:C1       0           0           1           0           0          
## A1:D1       0           1           0           0           0          
## A1:E1       1           0           0           0           0          
## B1:C1       0           0           0           0           0          
## B1:D1       0           0           0           0           0          
## B1:E1       0           0           0           0           0          
## A1:B1:C1    0           0           0           0           0          
## A1:B1:D1    0           0           0           0           0          
## A1:B1:E1    0           0           0           0           0          
##             A1:B1:C1:D1:E1 C1:D1 C1:E1 D1:E1
## (Intercept) 0              0     0     0    
## A1          1              0     0     0    
## B1          0              0     0     0    
## C1          0              0     0     0    
## D1          0              0     0     0    
## E1          0              0     0     0    
## A1:B1       0              0     0     0    
## A1:C1       0              0     0     0    
## A1:D1       0              0     0     0    
## A1:E1       0              0     0     0    
## B1:C1       0              0     0     1    
## B1:D1       0              0     1     0    
## B1:E1       0              1     0     0    
## A1:B1:C1    0              0     0     0    
## A1:B1:D1    0              0     0     0    
## A1:B1:E1    0              0     0     0

6.2 General method for choosing a fractional factorial design

To select a \(2^{f-q}\) fractional factorial design:

  • choose \(q\) independent factorial contrasts for the generators, or defining words, \(\nu_1,\ldots,\nu_q\). Typically, we choose higher-order interactions (due to effect hierarchy):

\[ \nu_{1}=\boldsymbol{c}_{1},\ldots,\nu_{q} = \boldsymbol{c}_{q}\,. \]

  • all the hadamard products of \(\boldsymbol{c}_{1},\dots,\boldsymbol{c}_{q}\) are also aliased with the mean, and together give the defining relation:

\[ I = \nu_1 = \ldots = \nu_q = \nu_1\nu_q = \ldots = \nu_1\cdots\nu_q\,. \]

  • the aliasing scheme is a list of the \(2^{f-q}\) alias strings. Every effect in one string is estimated by the same contrast in the observations:

\[ \begin{array}{ccccccccccccc} I & = & \nu_1 & = & \ldots & = & \nu_q & = & \nu_1\nu_q & = & \ldots & = & \nu_1\cdots\nu_q \\ A & = & A\nu_1 & = & \ldots & = & A\nu_q & = & A\nu_1\nu_q & = & \ldots & = & A\nu_1\cdots\nu_q \\ B & = & B\nu_1 & = & B\ldots & = & B\nu_q & = & B\nu_1\nu_q & = & \ldots & = & B\nu_1\cdots\nu_q \\ \vdots \\ CD & = & CD\nu_1 & = & CD\ldots & = & CD\nu_q & = & CD\nu_1\nu_q & = & CD\ldots & = & CD\nu_1\cdots\nu_q \\ \vdots \end{array} \] All the effects within a single alias string are aliased, and cannot be simultaneously aliased. In fact, the estimation of any effect within an alias string can only proceed if all other effects in the string are assumed zero; otherwise, we can estimate the sum of the effects (see Section 6.1).

To find the treatments in a particular fraction, we simply need to solve a set of equations of the form

\[ \nu_1 = \pm 1, \quad \nu_2 + \pm 1, \quad \ldots \quad \nu_q = \pm 1\,, \] with \(2^{f-q}\) treatments satisfying the \(2^q\) equations corresponding to each choice of \(\pm 1\) for each generator.

Example 6.2 Consider a \(2^{6-2}\) design, with \(q=2\) generators \(ABCE\) and \(BCDF\). The defining relation is given by

\[ I = ABCE = BCDF = ADEF\,. \] The aliasing scheme has \(2^{6-2} = 16\) strings, each of which contains \(2^2 = 4\) effects or words.

\[ \begin{array}{ccccccc} I & = & ABCE & = & BCDF & = & ADEF \\ A & = & BCE & = & ABCDF & = & DEF \\ B & = & ACE & = & CDF & = & ABDEF \\ C & = & ABE & = & BDF & = & ACDEF \\ D & = & ABCDE & = & BCF & = & AEF \\ E & = & ABC & = & BCDEF & = & ADF \\ F & = & ABCEF & = & BCD & = & ADE \\ AB & = & CE & = & ACDF & = & BDEF \\ AC & = & BE & = & ABDF & = & CDEF \\ AD & = & BCDE & = & ABCF & = & EF \\ AE & = & BC & = & ABCDEF & = & DF \\ AF & = & BCEF & = & ABCD & = & DE \\ BD & = & ACDE & = & CF & = & ABEF \\ BF & = & ACEF & = & CD & = & ABDE \\ ABD & = & CDE & = & ACF & = & BEF \\ ABF & = & CEF & = & ACD & = & BDE \\ \end{array} \] This aliasing scheme can result from any one of the four possible fractions defined by

\[ ABCE = \pm 1\,,\quad BCDF = \pm 1\,. \] Each fraction has (essentially) the same statistical properties, except the sign of the biasing coefficients from the alias matrix may be reversed (-1, rather than +1).

For example, the treatments in the fraction may be those \(2^{f-q} = 2^{6-2} = 16\) treatments that all have \(ABCE = +1\) and \(BCDF = +1\).

We can also use FrF2 to find two-level fractional factorial designs, as we already saw in Example 6.1. The generators argument can be used to specify which factorial effects to use as generators. These are specified using what FrF2 refers to as the \(f-q\) base factors. The \(q\) generators must specify with which factorial effects in the base factors the \(q\) additional factors are aliased.
For Example 6.2, a \(2^{6-2}\) design, the base factors are \(A, B, C, D\) and from our defining relation we have \(E = ABC\) and \(F = BCD\).

ff.2.6.2 <- FrF2::FrF2(nruns = 16, nfactors = 6, generators = c("ABC", "BCD"), 
                       randomize = F, alias.info = 3)

Once FrF2 has generated the design, we can interrogate the aliasing (up to three-factor interactions) using design.info (and using the aliases function, see Example 6.1).

library(FrF2)
design.info(ff.2.6.2)$aliased
## $legend
## [1] "A=A" "B=B" "C=C" "D=D" "E=E" "F=F"
## 
## $main
## [1] "A=BCE=DEF" "B=ACE=CDF" "C=ABE=BDF" "D=AEF=BCF" "E=ABC=ADF" "F=ADE=BCD"
## 
## $fi2
## [1] "AB=CE"    "AC=BE"    "AD=EF"    "AE=BC=DF" "AF=DE"    "BD=CF"    "BF=CD"   
## 
## $fi3
## [1] "ABD=ACF=BEF=CDE" "ABF=ACD=BDE=CEF"

By default, FrF2 chooses the fraction defined by each generator being equal to +1.

knitr::kable(ff.2.6.2, align = "r", 
             caption = "Treatments from a $2^{6-2}$ fractional factorial design.")
Table 6.4: Treatments from a \(2^{6-2}\) fractional factorial design.
A B C D E F
-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

6.3 Resolution and aberration

Clearly, the numbers of factors involved in the effects in the defining relation play an important role in the properties of the design.

Definition 6.4 Each factorial effect is commonly referred to as a word, and the number of factors involved in a factorial effect is its length.

For example, word \(ABCD\) has length 4; word \(BDE\) has length 3.

Definition 6.5 The resolution of a \(2^{f-q}\) design is the length of the shortest word in the defining relation.

A design having resolution \(R\) implies that no effect involving \(x\) factors is aliased with effects involving less than \(R-x\) factors.

Designs of the following resolution are particularly common.

  • Resolution III: shortest word of length 3. No main effect is aliased with any other main effect; at least one main effect of aliased with a two-factor interaction.

  • Resolution IV: shortest word of length 4. No main effect is aliased with any other main effect or any two-factor interaction; at least one pair of two-factor interactions are aliased together.

  • Resolution V: shortest word of length 5. No main effect or two-factor interaction is aliased with any other main effect or two-factor interaction.

For example,

  • \(2^{6-2}\), \(I = ABCD = CDEF = ABEF\): resolution IV.

  • \(2^{3-1}\), \(I = ABC\): resolution III.

Definition 6.6 The word length pattern of a \(2^{f-q}\) design is given by

\[ W = (w_3, w_4, \ldots, w_f)\,, \] where \(w_i\) is the number of words of length \(i\) in the defining relation.

For example,

  • \(d_1\): \(2^{7-2}\), \(I = ABCF = ADEG = BCDEFG\)

  • \(d_2\): \(2^{7-2}\), \(I = DEFG = ABCDF = ABCEG\)

are both resolution IV designs, but have different word length patterns

  • \(W(d_1) = (0, 2, 0, 1, 0)\)
  • \(W(d_2) = (0, 1, 2, 0, 0)\).

Definition 6.7 For two \(2^{f-q}\) designs, say \(d^\star\) and \(d^\dagger\), let \(r\) be the smallest integer such that \(w_r(d^\star) \ne w_r(d^\dagger)\). Then design \(d^\star\) is said to have less aberration than design \(d^\dagger\) if

\[ w_r(d^\star) < w_r(d^\dagger)\,. \]

If no design has less aberration than \(d^\star\), then \(d^\star\) has minimum aberration.

Consider again designs \(d_1\) and \(d_2\) from above (\(2^{7-2}\) fractions). Here,

\[ \begin{array}{ccccccc} w_3(d_1) & = & 0 & = & w_3(d_2) & = & 0 \\ w_4(d_1) & = & 2 & > & w_4(d_2) & = & 1 \,, \\ \end{array} \] and hence \(d_2\) has less aberration than \(d_1\). In fact, \(d_2\) has minimum aberration.

We can use FrF2 to find designs of a specific resolution using the resolution argument (and leaving nruns and generators unspecified). The resulting design will have the minimum number of runs required to obtain the requested resolution.

ff.2.6.2.r <- FrF2::FrF2(nfactors = 6, resolution = 4, 
                         randomize = F, alias.info = 3)
design.info(ff.2.6.2.r)$aliased
## $legend
## [1] "A=A" "B=B" "C=C" "D=D" "E=E" "F=F"
## 
## $main
## [1] "A=BCE=BDF" "B=ACE=ADF" "C=ABE=DEF" "D=ABF=CEF" "E=ABC=CDF" "F=ABD=CDE"
## 
## $fi2
## [1] "AB=CE=DF" "AC=BE"    "AD=BF"    "AE=BC"    "AF=BD"    "CD=EF"    "CF=DE"   
## 
## $fi3
## [1] "ACD=AEF=BCF=BDE" "ACF=ADE=BCD=BEF"

When generators and resolution are not specified, FrF2 function selects designs from catalogues of good designs, most of which have minimum aberration.

ff.2.6.2.a <- FrF2::FrF2(nfactors = 6, nruns = 16, 
                         randomize = F, alias.info = 3)
design.info(ff.2.6.2.a)$aliased
## $legend
## [1] "A=A" "B=B" "C=C" "D=D" "E=E" "F=F"
## 
## $main
## [1] "A=BCE=BDF" "B=ACE=ADF" "C=ABE=DEF" "D=ABF=CEF" "E=ABC=CDF" "F=ABD=CDE"
## 
## $fi2
## [1] "AB=CE=DF" "AC=BE"    "AD=BF"    "AE=BC"    "AF=BD"    "CD=EF"    "CF=DE"   
## 
## $fi3
## [1] "ACD=AEF=BCF=BDE" "ACF=ADE=BCD=BEF"

6.4 Analysis of fractional factorial designs

The analysis can proceed as for full factorial designs (Chapter 4). Assuming only one factorial effect in each alias string is non-zero, we can estimate \(2^{f-q}-1\) factorial effects (one from each string) either by fitting the unit-treatment model or the corresponding regression model.

For Example 6.1, we can use the unit-treatment model and contrasts to estimate all main effects and selected two-factor interactions, assuming all other factorial effects are zero.

spring$treatment <- factor(1:16)
spring.ut <- lm(height ~ treatment, data = spring)
fac.contrasts.emmc <- function(nlevs, ...) {
  spring.num <- apply(spring[, c("A", "B", "C", "D", "E")], 2, fac_to_numeric)
  data.frame(model.matrix(~ . + A:B + A:C + A:D + A:E + B:C 
                          + B:D + B:E, data.frame(spring.num))[, -1] / 8)
}
spring.emm <- emmeans::emmeans(spring.ut, ~ treatment)
emmeans::contrast(spring.emm, 'fac.contrasts')
##  contrast estimate  SE df t.ratio p.value
##  A         -0.2612 NaN  0     NaN     NaN
##  B          0.2213 NaN  0     NaN     NaN
##  C          0.1762 NaN  0     NaN     NaN
##  D          0.0288 NaN  0     NaN     NaN
##  E          0.1037 NaN  0     NaN     NaN
##  A.B        0.0838 NaN  0     NaN     NaN
##  A.C       -0.1663 NaN  0     NaN     NaN
##  A.D        0.0563 NaN  0     NaN     NaN
##  A.E        0.0262 NaN  0     NaN     NaN
##  B.C        0.0163 NaN  0     NaN     NaN
##  B.D        0.0187 NaN  0     NaN     NaN
##  B.E       -0.0362 NaN  0     NaN     NaN

When looking at this output, we must remember the aliasing scheme and recognise that we can only estimate these effects if all of their alaises are zero. Otherwise, each of these factorial effects is biased and not estimable (we are actually estimating the linear combination of all the aliased effects).

Alternatively, we can fit the regression model directly in the contrasts; lm automatically recognises which pairs of effects are aliased, and chooses the lexicographically first effect to include in the model.

spring.lm <- lm(height ~ (A + B + C + D + E) ^ 5, data = spring)
c(na.omit(2 * coef(spring.lm)[-1]))
##       A1       B1       C1       D1       E1    A1:B1    A1:C1    A1:D1 
## -0.26125  0.22125  0.17625  0.02875  0.10375  0.08375 -0.16625  0.05625 
##    A1:E1    B1:C1    B1:D1    B1:E1 A1:B1:C1 A1:B1:D1 A1:B1:E1 
##  0.02625  0.01625  0.01875 -0.03625  0.00875 -0.03875 -0.04875

In this experiment, there are three alias string that only include three-factor interactions. We may wish to use these three degrees of freedom to estimate \(\sigma^2\), under the assumption that all six interactions involved in these three strings are zero.

spring.lm <- lm(height ~ (A + B + C + D + E) ^ 2, data = spring)
anova(spring.lm)
## Analysis of Variance Table
## 
## Response: height
##           Df Sum Sq Mean Sq F value Pr(>F)   
## A          1 0.2730  0.2730   51.78 0.0055 **
## B          1 0.1958  0.1958   37.13 0.0089 **
## C          1 0.1243  0.1243   23.56 0.0167 * 
## D          1 0.0033  0.0033    0.63 0.4863   
## E          1 0.0431  0.0431    8.17 0.0647 . 
## A:B        1 0.0281  0.0281    5.32 0.1043   
## A:C        1 0.1106  0.1106   20.97 0.0196 * 
## A:D        1 0.0127  0.0127    2.40 0.2191   
## A:E        1 0.0028  0.0028    0.52 0.5220   
## B:C        1 0.0011  0.0011    0.20 0.6848   
## B:D        1 0.0014  0.0014    0.27 0.6412   
## B:E        1 0.0053  0.0053    1.00 0.3917   
## Residuals  3 0.0158  0.0053                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

6.5 Blocking fractional fractorial designs

We block fractional factorial designs using the same approach as Chapter 5. To block a \(2^{f-q}\) design into \(b = 2^m\) blocks, we choose \(m\) factorial effects to confound with blocks, also confounding all products of these \(m\) effects. However, we of course also confound the \(2^q-1\) aliases of each of these \(2^m-1\) effects. Hence, we actually choose to confound \(2^m-1\) strings of factorial effects with blocks.

We must pay particular attention to make sure we do not accidentically confound a lower-order effect through the aliasing scheme. We can also use FrF2 to find blocked factorial designs.

Example 6.3 Consider a \(2^{6-2}\) design with defining relation

\[ I = ABCE = ABDF = CDEF\,. \] To split this design into \(b=2^2 = 4\) blocks of size \(k=4\), we choose \(m=2\) defining blocks, and also confound their product.

\[ \begin{array}{ccc} \mathrm{Block}_1 & = & ACD \\ \mathrm{Block}_2 & = & BCD \\ \mathrm{Block}_1\mathrm{Block}_2 & = & AB\,. \end{array} \] We also confound all aliases of these effects:

\[ \begin{array}{ccccccccc} \mathrm{Block}_1 & = & ACD & = & BDE & = & BCF & = & ADEF \\ \mathrm{Block}_2 & = & BCD & = & ADE & = & ACF & = & BEF \\ \mathrm{Block}_1\mathrm{Block}_2 & = & AB & = & CE & = & DF & = & ABCDEF \,. \end{array} \] We can also find this design using FrF2, combining the arguments generators and blocks.

ff.2.6.2.b.4 <- FrF2::FrF2(nruns = 16, nfactors = 6, generators = c("ABC", "ABD"), blocks = c("ACD", "BCD"),
                           randomize = F, alias.block.2fis = T, alias.info = 3)
design.info(ff.2.6.2.b.4)$aliased
## $legend
## [1] "A=A" "B=B" "C=C" "D=D" "E=E" "F=F"
## 
## $main
## [1] "A=BCE=BDF" "B=ACE=ADF" "C=ABE=DEF" "D=ABF=CEF" "E=ABC=CDF" "F=ABD=CDE"
## 
## $fi2
## [1] "AC=BE" "AD=BF" "AE=BC" "AF=BD" "CD=EF" "CF=DE"
## 
## $fi3
## character(0)
design.info(ff.2.6.2.b.4)$aliased.with.blocks
##  [1] "AB"  "CE"  "DF"  "ACD" "ACF" "ADE" "AEF" "BCD" "BCF" "BDE" "BEF"

One block of this design can be found by finding all the treatment combinations that satisfy, for example,

\[ ABCE = +1, ABDF = +1, ACD = -1, BCD = -1\,. \] Fixing values for \(ABCE\) and \(ABDF\), the other blocks are formed from the other 3 combinations of each of \(ACD\) and \(BCD\) being equal to \(\pm 1\). We can also use FrF2.

block12 <- ff.2.6.2.b.4[1:8, ]
block34 <- ff.2.6.2.b.4[9:16, ]
knitr::kable(cbind(block12, block34), 
      caption = "Fractional factorial 
      $2^{6-2}$ design in $b=4$ blocks of size $k=4$.",
      align = "r")
Table 6.5: Fractional factorial \(2^{6-2}\) design in \(b=4\) blocks of size \(k=4\).
Blocks A B C D E F Blocks A B C D E F
1 -1 -1 -1 -1 -1 -1 3 -1 1 -1 1 1 -1
1 -1 -1 1 1 1 1 3 -1 1 1 -1 -1 1
1 1 1 -1 1 -1 1 3 1 -1 -1 -1 1 1
1 1 1 1 -1 1 -1 3 1 -1 1 1 -1 -1
2 -1 1 -1 -1 1 1 4 -1 -1 -1 1 -1 1
2 -1 1 1 1 -1 -1 4 -1 -1 1 -1 1 -1
2 1 -1 -1 1 1 -1 4 1 1 -1 -1 -1 -1
2 1 -1 1 -1 -1 1 4 1 1 1 1 1 1

Analysis proceeds as before, except no factorial effect can be estimated that is within an alias string that is confounded with blocks. For Example, split the spring experiment from Example 6.1 into \(b=2\) blocks of size \(k=8\) using confounding the alias string \(ABE = ACD\) with blocks.

spring.blocks <- spring
spring.blocks$blocks <- with(data.frame(spring), fac_to_numeric(A) * fac_to_numeric(B) * fac_to_numeric(C))
springb.lm <- lm(height ~ blocks + (A + B + C + D + E) ^ 3, data = spring.blocks)
anova(springb.lm)
## Analysis of Variance Table
## 
## Response: height
##           Df Sum Sq Mean Sq F value Pr(>F)
## blocks     1 0.0003  0.0003     NaN    NaN
## A          1 0.2730  0.2730     NaN    NaN
## B          1 0.1958  0.1958     NaN    NaN
## C          1 0.1243  0.1243     NaN    NaN
## D          1 0.0033  0.0033     NaN    NaN
## E          1 0.0431  0.0431     NaN    NaN
## A:B        1 0.0281  0.0281     NaN    NaN
## A:C        1 0.1106  0.1106     NaN    NaN
## A:D        1 0.0127  0.0127     NaN    NaN
## A:E        1 0.0028  0.0028     NaN    NaN
## B:C        1 0.0011  0.0011     NaN    NaN
## B:D        1 0.0014  0.0014     NaN    NaN
## B:E        1 0.0053  0.0053     NaN    NaN
## A:B:D      1 0.0060  0.0060     NaN    NaN
## A:B:E      1 0.0095  0.0095     NaN    NaN
## Residuals  0 0.0000     NaN

6.6 Exercises

  1. A \(2^{5-2}\) design has generators \(ACD\) and \(BCE\).

    1. Write down the full defining relation. What resolution is this design?

    2. After analysis, factor \(E\) turns out to be unimportant. By assuming that all effects involving factor \(E\) and all three-factor and higher-order interactions are negligible, determine which two-factor interactions can be estimated together with the four main effects of factors \(A\), \(B\), \(C\) and \(D\).

Solution
  1. The full defining relation is

\[ I = ACD = BCE = ABDE\,. \] The shortest word in the defining relation has length three, and therefore the design has resolution III.

  1. Consider the full aliasing scheme:
\[ \begin{array}{ccccccc} A & = & CD & = & ABCE & = & BDE \\ B & = & ABCD & = & CE & = & ADE \\ C & = & AD & = & BE & = & ABCDE \\ D & = & AC & = & BCDE & = & ABE \\ E & = & ACDE & = & BC & = & ABD \\ AB & = & BCD & = & ACE & = & DE \\ AE & = & CDE & = & ABC & = & BD \\ \end{array} \] If all the factorial effects involving factor \(E\) and all three-factor and higher-order interactions are negligible, we can estimate the two-factor interactions \(AB\), \(BC\) and \(BD\) in addition to the main effects of the first four factors.
  1. Consider the following two fractional factorial designs.

    1. A \(2^{6-2}\) design with generators \(ABCDE\) and \(ABDF\).
    2. A \(2^{6-2}\) design with generators \(ABCE\) and \(ABDF\).
    1. What is the resolution of each design?

    2. Which design would be preferred under the criterion of minimum aberration?

    3. For design ii., if we know that any two-factor interaction involving factor \(F\) is negligible, which other two-factor interactions can be estimated under the assumption that three-factor and higher-order interactions are also negligible?

Solution
  1. Design i. has full defining relation \(I = ABCDE = ABDF = CEF\), and hence is resolution III. Design ii. has full defining relation \(I = ABCE = ABDF = CDEF\), and hence is resolution IV.

  2. Design ii. would be preferred under the citerion of minimum aberration, as it is of higher resolution.

  3. The alias strings from design ii. including two-factor interactions are as below:

\[ \begin{array}{ccccccc} AB & = & CE & = & DF & = & ABCDEF \\ AC & = & BE & = & BCDF & = & ADEF \\ AD & = & BCDE & = & BF & = & ACEF \\ AE & = & BC & = & BDEF & = & ACDF \\ AF & = & BCEF & = & BD & = & ACDE \\ CD & = & ABDE & = & ABCF & = & EF \\ CF & = & ABEF & = & ABCD & = & DE \\ \end{array} \] It follows that if all two-factor interactions that involve factor \(F\) are neglible, along with all three-factor and higher-order interactions, then we can estimate two-factor interactions \(AD\), \(BD\), \(CD\) and \(DE\). The pairs of interactions \(AB = CE\), \(AC = BE\) and \(AE = BC\) are still aliased together.
    1. Design an experiment with \(n=8\) runs to study the effect of the following five factors on yield:

      • \(A\): temperature (160°F or 180°F)
      • \(B\): concentration (30% or 40%)
      • \(C\): catalyst (1 or 2)
      • \(D\): stirring rate (60 or 100 rpm)
      • \(E\): pH (low or high).

      It is known that the combinations temperature 180°F, concentration 40%, stirring rate 100 rpm and temperature 180°F, catalyst 2, pH high may lead to disastrous results and should be avoided. Write down the design in coded (-1, +1) units.

    2. For the five factors in part (a), find a design with \(n=8\) runs such that the temperature-by-catalyst interaction (\(AC\)) and the concentration-by-catalyst (\(BC\)) interactions are neither aliased with main effects or with each other.

Solution
  1. We require a \(2^{5-2}\) fractional factorial design. We could choose to alias the \(q=2\) interactions \(ABD\) and \(ACE\) wth the mean, along with their product \(BCDE\).

    We want to avoid fractions with \(A = +1\), \(B = +1\) and \(D = +1\), and \(A = +1\), \(C = +1\) and \(E = +1\). These lead to \(ABD = +1\) and \(ACE = +1\). Hence we just need to choose the fraction that sets both \(ABD = -1\) and \(ACE = -1\):

    Run A B C D E
    1 -1 -1 -1 -1 -1
    2 -1 +1 +1 +1 +1
    3 -1 -1 +1 -1 +1
    4 -1 +1 -1 +1 -1
    5 +1 -1 +1 +1 -1
    6 +1 +1 -1 -1 +1
    7 +1 -1 -1 +1 +1
    8 +1 +1 +1 -1 -1
  2. We need a \(2^{5-2}\) fractional factorial design such that \(AC\) and \(BC\) are not alised with main effects or each other. Therefore, our defining relation cannot contain any three letter words contain \(AC\) or \(BC\). A design with defining relation

    \[ I = ABDE = ABCE = CD \] has this property, as \(AC = BCDE = BE = AD\) and \(BC = ACDE = AE = BD\). There are also other choices that have this property.

    [To find this design, I started with the alias strings I wanted for \(AC\) and \(BC\) and then worked backwards.]

  1. An experimenter who wishes to use a \(2^{8-2}\) design can only do 16 runs per day, and would like to include “day” as a blocking factor. What design would you recommend and why? Give the defining relation of the fraction you choose, and the defining generators for the blocks. Which two-factor interactions can be clearly estimated?
Solution

The minimum aberration resolution V design has defining relation \(I = ABCDG = ABEFGH = CDEFH\) (there are other similar possibilities).

There are 64 alias strings (including the defining relation) and we need to choose two to define our blocks (remembering the product will also be confounded). Two good choices are

\[ ACE = BDEG = BCFGH = ADFH \] and

\[ BDF = ACFG = ADEGH = BCEH\,, \] with product

\[ ABCDEF = EFG = CDGH = ABH\,. \] This choice leads to no two-factor interactions being confounded with blocks and hence, as the fraction is resolution V, all two-factor interactions are clear of main effects and other two-factor interactions.

References

Wu, C. F. J. and Hamada, M. (2009) Experiments: Planning, Analysis, and Parameter Design Optimization. 2nd ed. New York: Wiley.

  1. If we only run one-half of the treatments from a \(2^5\) design, the design contains \(\frac{2^5}{2} = 2^{5-1}\) treatments↩︎

  2. Except for the defining relation, where no effects are estimable↩︎