This report captures work done for the individual homework for Week 13. R code along with the results are provided. The required homework problems were taken from “Design and Analysis of Experiments 8th Edition”:
   1) 8.2
   2) 8.24
   3) 8.25
   3) 8.28
   3) 8.40
   3) 8.48
   3) 8.60 —-

Setting Things Up

# setup Libraries
library(knitr)
library(dplyr)
library(tidyr)
library(GAD)
library(tinytex)
library(ggplot2)
library(ggfortify)
library(car)
library(DoE.base)
library(FrF2)

Problem 1 (8.2)

Suppose that in Problem 6.15, only a one-half fraction of the 2^4 design could be run. Construct the design and perform the analysis, using the data from replicate I.

des.res4 <- FrF2(nfactors=4, resolution=4,randomize=FALSE)
response<-c(7.037,16.867,13.876,17.273,11.846,4.368,9.360,15.653)
des.resp <- add.response(des.res4,response)
DanielPlot(des.resp,half=TRUE)


The halfnormal plot shows that none of the factors or interactions are significant to an alpha of 0.05.

Problem 2 (8.24)

Construct a 2^(5-1) design. Show how the design may be run in two blocks of eight observations each. Are any main effects or two-factor interactions confounded with blocks?

des.res5 <- FrF2(nfactors=5,
                 blocks=2,nruns=16,randomize=FALSE,alias.block.2fis=TRUE)
summary(des.res5)
## Call:
## FrF2(nfactors = 5, blocks = 2, nruns = 16, randomize = FALSE, 
##     alias.block.2fis = TRUE)
## 
## Experimental design of type  FrF2.blocked 
## 16  runs
## blocked design with  2  blocks of size  8 
## 
## Factor settings (scale ends):
##    A  B  C  D  E
## 1 -1 -1 -1 -1 -1
## 2  1  1  1  1  1
## 
## Design generating information:
## $legend
## [1] A=A B=B C=C D=D E=E
## 
## $`generators for design itself`
## [1] E=ABCD
## 
## $`block generators`
## [1] AB
## 
## 
## no aliasing of main effects or 2fis  among experimental factors
## 
## Aliased with block main effects:
## [1] AB
## 
## The design itself:
##   run.no run.no.std.rp Blocks  A  B  C  D  E
## 1      1         5.1.1      1 -1  1 -1 -1 -1
## 2      2         6.1.2      1 -1  1 -1  1  1
## 3      3         7.1.3      1 -1  1  1 -1  1
## 4      4         8.1.4      1 -1  1  1  1 -1
## 5      5         9.1.5      1  1 -1 -1 -1 -1
## 6      6        10.1.6      1  1 -1 -1  1  1
## 7      7        11.1.7      1  1 -1  1 -1  1
## 8      8        12.1.8      1  1 -1  1  1 -1
##    run.no run.no.std.rp Blocks  A  B  C  D  E
## 9       9         1.2.1      2 -1 -1 -1 -1  1
## 10     10         2.2.2      2 -1 -1 -1  1 -1
## 11     11         3.2.3      2 -1 -1  1 -1 -1
## 12     12         4.2.4      2 -1 -1  1  1  1
## 13     13        13.2.5      2  1  1 -1 -1  1
## 14     14        14.2.6      2  1  1 -1  1 -1
## 15     15        15.2.7      2  1  1  1 -1 -1
## 16     16        16.2.8      2  1  1  1  1  1
## class=design, type= FrF2.blocked 
## NOTE: columns run.no and run.no.std.rp  are annotation, 
##  not part of the data frame

From the output, no main effects are confounded with the blocks, but the two-factor interactions AB and CF are confounded with the blocks.

Problem 3 (8.25)

Construct a 2^(7-2) design. Show how the design may be run in four blocks of eight observations each. Are any main effects or two-factor interactions confounded with blocks?

des.res7 <- FrF2(nfactors=7,
                 blocks=2,nruns=32,randomize=FALSE,alias.block.2fis=TRUE)
summary(des.res7)
## Call:
## FrF2(nfactors = 7, blocks = 2, nruns = 32, randomize = FALSE, 
##     alias.block.2fis = TRUE)
## 
## Experimental design of type  FrF2.blocked 
## 32  runs
## blocked design with  2  blocks of size  16 
## 
## Factor settings (scale ends):
##    A  B  C  D  E  F  G
## 1 -1 -1 -1 -1 -1 -1 -1
## 2  1  1  1  1  1  1  1
## 
## Design generating information:
## $legend
## [1] A=A B=B C=C D=D E=E F=F G=G
## 
## $`generators for design itself`
## [1] F=ABC  G=ABDE
## 
## $`block generators`
## [1] AB
## 
## 
## Alias structure:
## $fi2
## [1] AC=BF AF=BC
## 
## Aliased with block main effects:
## [1] AB CF
## 
## The design itself:
##    run.no run.no.std.rp Blocks  A  B  C  D  E  F  G
## 1       1         9.1.1      1 -1  1 -1 -1 -1  1 -1
## 2       2        10.1.2      1 -1  1 -1 -1  1  1  1
## 3       3        11.1.3      1 -1  1 -1  1 -1  1  1
## 4       4        12.1.4      1 -1  1 -1  1  1  1 -1
## 5       5        13.1.5      1 -1  1  1 -1 -1 -1 -1
## 6       6        14.1.6      1 -1  1  1 -1  1 -1  1
## 7       7        15.1.7      1 -1  1  1  1 -1 -1  1
## 8       8        16.1.8      1 -1  1  1  1  1 -1 -1
## 9       9        17.1.9      1  1 -1 -1 -1 -1  1 -1
## 10     10       18.1.10      1  1 -1 -1 -1  1  1  1
## 11     11       19.1.11      1  1 -1 -1  1 -1  1  1
## 12     12       20.1.12      1  1 -1 -1  1  1  1 -1
## 13     13       21.1.13      1  1 -1  1 -1 -1 -1 -1
## 14     14       22.1.14      1  1 -1  1 -1  1 -1  1
## 15     15       23.1.15      1  1 -1  1  1 -1 -1  1
## 16     16       24.1.16      1  1 -1  1  1  1 -1 -1
##    run.no run.no.std.rp Blocks  A  B  C  D  E  F  G
## 17     17         1.2.1      2 -1 -1 -1 -1 -1 -1  1
## 18     18         2.2.2      2 -1 -1 -1 -1  1 -1 -1
## 19     19         3.2.3      2 -1 -1 -1  1 -1 -1 -1
## 20     20         4.2.4      2 -1 -1 -1  1  1 -1  1
## 21     21         5.2.5      2 -1 -1  1 -1 -1  1  1
## 22     22         6.2.6      2 -1 -1  1 -1  1  1 -1
## 23     23         7.2.7      2 -1 -1  1  1 -1  1 -1
## 24     24         8.2.8      2 -1 -1  1  1  1  1  1
## 25     25        25.2.9      2  1  1 -1 -1 -1 -1  1
## 26     26       26.2.10      2  1  1 -1 -1  1 -1 -1
## 27     27       27.2.11      2  1  1 -1  1 -1 -1 -1
## 28     28       28.2.12      2  1  1 -1  1  1 -1  1
## 29     29       29.2.13      2  1  1  1 -1 -1  1  1
## 30     30       30.2.14      2  1  1  1 -1  1  1 -1
## 31     31       31.2.15      2  1  1  1  1 -1  1 -1
## 32     32       32.2.16      2  1  1  1  1  1  1  1
## class=design, type= FrF2.blocked 
## NOTE: columns run.no and run.no.std.rp  are annotation, 
##  not part of the data frame

From the output, no main effects are confounded with the blocks, but the two-factor interactions: AB, AC, AF, BC, BF and CF are confounded with the blocks.

Problem 4 (8.28)

A 16-run experiment was performed in a semiconductor manufacturing plant to study the effects of six factors on the curvature or camber of the substrate devices produced. The six variables and their levels are shown in Table P8.2

Each run was replicated four times, and a camber measurement was taken on the substrate. The data are shown in Table P8.3.

a) What type of design did the experimenters use?

des.res828 <- FrF2(nfactors=6,
                 blocks=1,nruns=16,randomize=FALSE,alias.block.2fis=TRUE)
summary(des.res828)
## Call:
## FrF2(nfactors = 6, blocks = 1, nruns = 16, randomize = FALSE, 
##     alias.block.2fis = TRUE)
## 
## Experimental design of type  FrF2 
## 16  runs
## 
## Factor settings (scale ends):
##    A  B  C  D  E  F
## 1 -1 -1 -1 -1 -1 -1
## 2  1  1  1  1  1  1
## 
## Design generating information:
## $legend
## [1] A=A B=B C=C D=D E=E F=F
## 
## $generators
## [1] E=ABC F=ABD
## 
## 
## Alias structure:
## $fi2
## [1] AB=CE=DF AC=BE    AD=BF    AE=BC    AF=BD    CD=EF    CF=DE   
## 
## 
## The design itself:
##     A  B  C  D  E  F
## 1  -1 -1 -1 -1 -1 -1
## 2   1 -1 -1 -1  1  1
## 3  -1  1 -1 -1  1  1
## 4   1  1 -1 -1 -1 -1
## 5  -1 -1  1 -1  1 -1
## 6   1 -1  1 -1 -1  1
## 7  -1  1  1 -1 -1  1
## 8   1  1  1 -1  1 -1
## 9  -1 -1 -1  1 -1  1
## 10  1 -1 -1  1  1 -1
## 11 -1  1 -1  1  1 -1
## 12  1  1 -1  1 -1  1
## 13 -1 -1  1  1  1  1
## 14  1 -1  1  1 -1 -1
## 15 -1  1  1  1 -1 -1
## 16  1  1  1  1  1  1
## class=design, type= FrF2

The design used was a 2^(6-2) design at resolution IV, with four replicates.

b) What are the alias relationships in this design?
The aliases are:
I + ABCE + ACDF + BDEF
A + BCE + CDF + ABDEF
B + ACE + DEF + ABCDF
C + ABE + ADF + BCDEF
D + ACF + BEF + ABCDE
E + ABC + BDF + ACDEF
F + ACD + BDE + ABCEF
AB + CE + ADEF + BCDF
AC + BE + DF + ABCDEF
AD + CF + ABEF + BCDE
AE + BC + ABDF + CDEF
AF + CD + ABDE + BCEF
BD + EF + ABCF + ACDE
BF + DE + ABCD + ACEF
ABD + AEF + BCF + CDE
ABF + ADE + BCD + CEF


c) Do any of the process variables affect average camber?

setwd("D:/R Files/")
dat4 <- read.csv("D:/R Files/8-28.csv",header=TRUE)
mod4 <- lm(dat4$response~dat4$A+dat4$C+dat4$E+dat4$F+dat4$B+dat4$D,data = dat4)
summary(mod4)
## 
## Call:
## lm.default(formula = dat4$response ~ dat4$A + dat4$C + dat4$E + 
##     dat4$F + dat4$B + dat4$D, data = dat4)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0067672 -0.0022703 -0.0003875  0.0028797  0.0081328 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.0107016  0.0004793  22.328  < 2e-16 ***
## dat4$A       0.0019453  0.0004793   4.059 0.000152 ***
## dat4$C       0.0028016  0.0004793   5.845 2.57e-07 ***
## dat4$E      -0.0017234  0.0004793  -3.596 0.000676 ***
## dat4$F      -0.0038734  0.0004793  -8.082 5.03e-11 ***
## dat4$B       0.0002891  0.0004793   0.603 0.548823    
## dat4$D      -0.0007109  0.0004793  -1.483 0.143492    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.003834 on 57 degrees of freedom
## Multiple R-squared:  0.6975, Adjusted R-squared:  0.6657 
## F-statistic: 21.91 on 6 and 57 DF,  p-value: 3.566e-13
halfnormal(mod4)
## Warning in halfnormal.lm(mod4): halfnormal not recommended for models with more
## residual df than model df

Yes, the factors that impact the average camber are:
A = Lamination Temperature
C = Lamination Pressure
E = Firing Cycle Time
F = Firing Dew Point

d) Do any of the process variables affect the variability in camber measurements?

Running a linear model on the main effects and interactions that were available in the data, results in the following information. From the half-normal plot factors A & B are significant and impact the variability in camber measurements.

dat5 <- read.csv("D:/R Files/8-281.csv",header=TRUE)
A <- dat5$A
B <- dat5$B
C <- dat5$C
D <- dat5$D
E <- dat5$E
F <- dat5$F
mod5 <- lm(dat5$variability~A+B+C+D+E+F+
             A*B+A*C+B*C+A*D+B*D+C*D+D*E+A*B*D+B*C*D,data = dat5)
summary(mod5)
## 
## Call:
## lm.default(formula = dat5$variability ~ A + B + C + D + E + F + 
##     A * B + A * C + B * C + A * D + B * D + C * D + D * E + A * 
##     B * D + B * C * D, data = dat5)
## 
## Residuals:
## ALL 16 residuals are 0: no residual degrees of freedom!
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.35375        NaN     NaN      NaN
## A            7.95175        NaN     NaN      NaN
## B           -8.28862        NaN     NaN      NaN
## C            2.93725        NaN     NaN      NaN
## D           -1.64625        NaN     NaN      NaN
## E           -1.16862        NaN     NaN      NaN
## F           -4.62800        NaN     NaN      NaN
## A:B          0.47763        NaN     NaN      NaN
## A:C          1.26200        NaN     NaN      NaN
## B:C         -0.09012        NaN     NaN      NaN
## A:D         -2.31325        NaN     NaN      NaN
## B:D         -2.42788        NaN     NaN      NaN
## C:D         -5.43725        NaN     NaN      NaN
## D:E          4.10913        NaN     NaN      NaN
## A:B:D       -0.34062        NaN     NaN      NaN
## B:C:D        1.69912        NaN     NaN      NaN
## 
## Residual standard error: NaN on 0 degrees of freedom
## Multiple R-squared:      1,  Adjusted R-squared:    NaN 
## F-statistic:   NaN on 15 and 0 DF,  p-value: NA
halfnormal(mod5)

No, per the half normal plot above, no variables are significant to an alpha of 0.05 when looking at their standard deviation values.

e) If it is important to reduce camber as much as possible, what recommendations would you make?

Because we want to minimize the camber, I’ll take all main effects and flip their sign to generate the optimal minimum setting, which is as follows:
A = Lamination Temperature @ 55°C
B = Lamination Time @ 10 sec
C = Lamination Pressure @ 5 tn
D = Firing Temperature @ 1620 °C
E = Firing Cycle Time @ 29 hours
F = Firing Dew Point @ 26 °C

Problem 5 (8.40)

Consider the following experiment (shown in book).
Answer the following questions about this experiment:
(a) How many factors did this experiment investigate?

This experiment investigated 4 factors

  1. What is the resolution of this design?

This is a resolution IV design because no main effects are aliased with another main effect or with a two-factor interaction, but two-factor interactions are aliased with each other.

  1. Calculate the estimates of the main effects.
des.res840 <- FrF2(nfactors=4, resolution=4,randomize=FALSE)
response840<-c(8,10,12,7,13,6,5,11)
des.resp8401 <- add.response(des.res840,response840)
modelFactorEff <- coef(lm(des.resp8401))[-1]*2
modelFactorEff[1:4]
##   A1   B1   C1   D1 
## -1.0 -0.5 -0.5  5.0

The estimates of the main effects are shown above.

  1. What is the complete defining relation for this design?
    The complete defining relationship for this design is I = ABCD.

Problem 6 (8.48)

Consider the following design (shown in book).
a) What is the generator for column D?

The generator for column D is -ABC. b) What is the generator for column E?

The generator for column E is BC. c) If the design were folded over, what is the resolution of the combined design?

The design becomes a resolution IV. This is because the original design was a resolution III and folding adds 1 to the resolution.

Problem 7 (8.60)

Consider a partial fold over for the 2^(7-4)III design. Suppose that the partial fold over of this design is constructed using column A (+ signs only). Determine the alias relationships in the combined design.

The output below shows the alias relationships for both the main effects and two-factor interactions.

des.res860 <- FrF2(nfactors=7, resolution=3,randomize=FALSE)
folded <- fold.design(des.res860,column=1)
summary(folded)
## Multi-step-call:
## [[1]]
## FrF2(nfactors = 7, resolution = 3, randomize = FALSE)
## 
## $fold
## [1] 1
## 
## 
## Experimental design of type  FrF2.folded 
## 16  runs
## 
## Factor settings (scale ends):
##    A  B  C     fold  D  E  F  G
## 1 -1 -1 -1 original -1 -1 -1 -1
## 2  1  1  1   mirror  1  1  1  1
## 
## Design generating information:
## $legend
## [1] A=A    B=B    C=C    D=fold E=D    F=E    G=F    H=G   
## 
## 
## Alias structure:
## $main
## [1] B=CG=FH C=BG=EH E=CH=FG F=BH=EG G=BC=EF H=BF=CE
## 
## $fi2
## [1] AB=-DE         AC=-DF         AD=-BE=-CF=-GH AE=-BD         AF=-CD        
## [6] AG=-DH         AH=-DG        
## 
## 
## The design itself:
##     A  B  C     fold  D  E  F  G
## 1  -1 -1 -1 original  1  1  1 -1
## 2   1 -1 -1 original -1 -1  1  1
## 3  -1  1 -1 original -1  1 -1  1
## 4   1  1 -1 original  1 -1 -1 -1
## 5  -1 -1  1 original  1 -1 -1  1
## 6   1 -1  1 original -1  1 -1 -1
## 7  -1  1  1 original -1 -1  1 -1
## 8   1  1  1 original  1  1  1  1
## 9   1 -1 -1   mirror  1  1  1 -1
## 10 -1 -1 -1   mirror -1 -1  1  1
## 11  1  1 -1   mirror -1  1 -1  1
## 12 -1  1 -1   mirror  1 -1 -1 -1
## 13  1 -1  1   mirror  1 -1 -1  1
## 14 -1 -1  1   mirror -1  1 -1 -1
## 15  1  1  1   mirror -1 -1  1 -1
## 16 -1  1  1   mirror  1  1  1  1
## class=design, type= FrF2.folded