Chapter 12
Chapter 12
12 - Factorial Designs
Version 2.11
Felipe Campelo
http://orcslab.cpdee.ufmg.br/
Belo Horizonte
May 2015
“We did not evolve to understand or
comprehend reality. We evolved to survive it.
For understanding we need science.”
Mark A. Crislip
1952-
American infectologist
Image: http://boards.medscape.com/.29f3af03/
Factorial Designs
Basic definitions
Many experiments involve more than a single factor of interest - that is,
multiple independent variables that can influence a response variable.
In this context, the main effect of a factor quantifies the mean change
in the response variable due to changing between the levels of that
factor;
Adapted from M.H.Costa and T.L. Vieira’s course project for the Design and Analysis of Experiments Course,
PPGEE-UFMG, November 2013. The data used in this example is not necessarily the original one.
Image: http://refrigelms.com.br/ventilador-para-aviario-qla85-grade-p-1734.html
Exploratory data analysis
Example: Electrical current in motors
The exploratory plot suggests a relatively large effect for the State
factor, but is inconclusive with regards to the Manufacturer effect. Any
interaction effect is also likely to by small.
Lets assume for this example that the engineers want α = 0.05,
β = 0.2 and δ ∗ = 0.1A.
Factorial Designs
Statistical model for two factors
i = 1, . . . , a
yijk = µ + τi + βj + (τ β)ij + ijk j = 1, . . . , b
k = 1, . . . , n
a
X b
X
τi = 0 βj = 0
i=1 j=1
a
X b
X
(τ β)ij = (τ β)ij = 0
i=1 j=1
Factorial Designs
Statistical model for two factors
(
H0 : τi = 0, ∀i
Factor A, main effect:
H1 : ∃τi 6= 0
(
H0 : βj = 0, ∀j
Factor B, main effect:
H1 : ∃βj 6= 0
(
H0 : (τ β)ij = 0, ∀i, j
Interaction effect, AB:
H1 : ∃(τ β)ij 6= 0
Factorial Designs
Statistical model for two factors
The test statistics for these hypotheses will, as usual, be derived from
the partition of the total variability into specific components:
a X n
b X
X 2
SST = yijk − ȳ···
i=1 j=1 k =1
a b
X 2
X 2
= bn (ȳi·· − ȳ··· ) + an ȳ·j· − ȳ···
i=1 j=1
| {z } | {z }
SSA SSB
a X
b a X
b X
n
X 2 X 2
+n ȳij· − ȳi·· − ȳ·j· + ȳ··· + yijk − ȳij·
i=1 j=1 i=1 j=1 k =1
| {z } | {z }
SSAB SSE
SSE
MSE = E [MSE ] = σ 2
ab(n − 1)
Factorial Designs
Statistical model for two factors
(A) MSA
F0 =
MSE
(B) MSB
F0 =
MSE
(AB) MSAB
F0 =
MSE
> summary.lm(model)$r.squared
[1] 0.9615174
Example: Electrical current in motors
Statistical model for two factors
More generally,
∆ȳ
t0 = q
2 MS
n0
E
> plot(confint(mcp.manuf),
+ cex.axis = 1.2,
+ cex = 2)
Factorial designs
Multiple Comparisons
For this example, the engineers would have now enough data to draw
recommendations. For example, the data clearly shows that rewinded
motors result in much larger currents drawn, which results in extra
operational and structural (wiring, protection equipment, etc.) costs.
It is actually possible to design an experiment with a single replicate (particularly for larger designs). This will be discussed
later.
General Factorial Designs
Experiments with more than 2 factors
a X
b X
c X
n 2
X
2 y····
SST = yijkl −
abcn
i=1 j=1 k =1 l=1
a
1 X 2 y2
SSA = yi··· − ····
bcn abcn
i=1
b
1 X 2 y2
SSB = y·j·· − ····
acn abcn
j=1
c
1 X 2 y2
SSC = y··k · − ····
abn abcn
k =1
General Factorial Designs
Sum of squares: 2nd order interactions
a b
1 XX 2 y2
SSAB = yij·· − ···· − SSA − SSB
cn abcn
i=1 j=1
a c
1 XX 2 y2
SSAC = yi·k · − ···· − SSA − SSC
bn abcn
i=1 k =1
b c
1 XX 2 y2
SSBC = y·jk · − ···· − SSB − SSC
an abcn
j=1 k =1
General Factorial Designs
Sum of squares: 3rd order interaction and residual
a b c
1 XXX 2 y2
SSABC = yijk · − ····
n abcn
i=1 j=1 k =1
SSE =SST
− SSA − SSB − SSC
− SSAB − SSAC − SSBC
− SSABC
General Factorial Designs
Example: intraocular lenses
Adapted from L.M. Carvalho e D.F. Filgueiras’ course project for the Design and Analysis of Experiments Course,
PPGEE-UFMG, June 2013. The data used in this example is not necessarily the original one.
Eye image: http://www.peruenvideos.com/implante-lentes-intraoculares-curacion-cataratas/
Lens image: http://www.allaboutvision.com/conditions/iols.htm
General Factorial Designs
Example: intraocular lenses
Before being marketed each lens is tested for the compliance of their
optical properties, and the ones that fail to meet the required
specifications are discarded.
Three factors were selected for this preliminary study, each one with
two levels. The resources allocated to the study were enough for the
execution of exactly eight batches of lenses - in other words, a single
replicate for each combination of levels.
General Factorial Designs
Example: intraocular lenses
Since there is only one replicate, there are not enough degrees of
freedom to calculate MSE . Consequently, the test of hypotheses
becomes unfeasible.
> data <- read.table("../data files/lio.txt", header = TRUE)
To perform the test we need some degrees of freedom for the error
term. In cases with single replicates, the most usual way of doing this
is by discarding low-influence terms from the model. But which ones
should be discarded?
This heuristic is based on the sparsity principle, which states that most
systems are dominated by main effects and low-order interactions;
General Factorial Designs
Model simplification
Daniel plots work only in designs with only 2 levels per factor (2k
designs).
For a more general effects plot, check Whitcomb and Oehlert (2007), Graphical Selection of Effects in General Factorials:
http://goo.gl/6dw7dn
Example: intraocular lenses
Model simplification
> summary.lm(model2)$r.squared
[1] 0.9879681
> shapiro.test(model2$residuals)
W = 0.9271, p-value = 0.4902
Example: intraocular lenses
Exploring Specific Differences
> library(effects)
> lio.effs <- allEffects(model2)
> plot(lio.effs)
Example: intraocular lenses
Some conclusions
The effect of greatest impact on the quality of the process if the lathe
time. The proportion of lenses in conformity with the specifications
goes from 0.36 to 0.87, which strongly suggests the use of larger lathe
times as a good strategy.
The RCBD will contain one full experimental replicate per block. The
modeling and analysis aspects can be easily derived from the last two
chapters.
Bibliography
Required reading
1 D.C. Montgomery, G.C. Runger, Applied Statistics and Probability for Engineers, 3rd ed.,
2003 - Chapter 14;
2 P. Hoff, Applied Statistics and Experimental Design, Chapter 6 (Factorial Designs),
http://goo.gl/NiyVCX
Recommended reading
1 R. Feynman, Surely you’re joking, Mr. Feynman, W.W. Norton&Company, 1997.
2 H. Wickham, ggplot2: Elegant Graphics for Data Analysis, Springer 2009.
About this material
Conditions of use and referencing
This work is licensed under the Creative Commons CC BY-NC-SA 4.0 license
(Attribution Non-Commercial Share Alike International License version 4.0).
http://creativecommons.org/licenses/by-nc-sa/4.0/