1 Problem Setup

An engineer is interested in the effects of cutting speed A, tool geometry B, and cutting angle C on the life (in hours) of a machine tool. Two levels of each factor are chosen, and one replicate of a 2^3 factorial design is run.

2 Problem 1

Assuming that the design is split into two blocks, the effect that should be confounded with the blocks is the three factor interaction ABC. The higher order effects are typically the least significant and can be neglected. As a result, the three factor interaction will be sacrificed with the block. A proposed design for this 2^3 factorial design with two blocks can be seen in the code chunk below.

design1<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
design1$ABC<-design1$A * design1$B * design1$C
design1$block1<-ifelse(design1$ABC == -1, 1, 2)
design1$Trt<-c("(-1)", "a", "b", "ab", "c", "ac", "bc", "abc")
design1$AB<-design1$A * design1$B
design1$AC<-design1$A * design1$C
design1$BC<-design1$B * design1$C

As seen in the code chunk above, Block 1 would contain treatments (-1), ab, ac, and bc while Block 2 would contain treatments a, b, c, and abc.

3 Problem 2

Assuming that the design is split into four blocks, the effects that should be confounded with the blocks are the two factor interactions AB & AC. Since \(AB*AC=A^2BC=BC\), the two factor interaction BC is also confounded with the blocks as a consequence of using the other two factor interactions. In the case of four blocks, the three factor interaction cannot be confounded with a two factor interaction because a main effect is confounded as a consequence. The equation \(ABC*AB=A^2B^2C=C\) shows this. Main effects in a design are typically the primary interest and should be preserved when possible. As a result, the two factor interactions will be sacrificed with the block. A proposed design for this 2^3 factorial design with four blocks can be seen in the code chunk below.

design2<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
design2$AB<-design2$A * design2$B
design2$AC<-design2$A * design2$C
design2$block2<-as.numeric(interaction(design2$AB, design2$AC, drop = TRUE))
design2$Trt<-c("(-1)", "a", "b", "ab", "c", "ac", "bc", "abc")
design2$BC<-design2$B * design2$C
design2$ABC<-design2$A * design2$B * design2$C

As seen in the code chunk above, Block 1 would contain treatments a and bc, Block 2 would contain treatments c and ab, Block 3 would contain treatments b and ac, and Block 4 would contain treatments (-1) and abc.

4 Data Input

Now, a data frame will be created with the observations using the design from Problem 1. This can be seen in the code chunk below.

dat1<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
dat1$tool_life<-c(22, 32, 35, 55, 44, 40, 60, 39)
dat1$ABC<-dat1$A * dat1$B * dat1$C
dat1$blocks1<-ifelse(dat1$ABC == -1, 1, 2)
dat1$A<-as.factor(dat1$A)
dat1$B<-as.factor(dat1$B)
dat1$C<-as.factor(dat1$C)
dat1$blocks1<-as.factor(dat1$blocks1)

5 Problem 3

This data frame will now be fitted into a linear model. The half normal plot will be generated from the linear model. This can be seen in the code chunk below.

library(FrF2)
model1<-lm(tool_life~blocks1 + A + B + C + A:B + A:C + B:C, data = dat1)
DanielPlot(model1, half = TRUE, block = TRUE, autolab = FALSE)

The only effect that appears to be significant is the two factor interaction AC. All other effects roughly follow the same linear trend. The block also appears to follow that same linear trend and does not seem to be significant. Since the block is not significant, it was not worth it to run this design in blocks.

6 Complete R Code

# Problem 1
design1<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
design1$ABC<-design1$A * design1$B * design1$C
design1$block1<-ifelse(design1$ABC == -1, 1, 2)
design1$Trt<-c("(-1)", "a", "b", "ab", "c", "ac", "bc", "abc")
design1$AB<-design1$A * design1$B
design1$AC<-design1$A * design1$C
design1$BC<-design1$B * design1$C

# Problem 2
design2<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
design2$AB<-design2$A * design2$B
design2$AC<-design2$A * design2$C
design2$block2<-as.numeric(interaction(design2$AB, design2$AC, drop = TRUE))
design2$Trt<-c("(-1)", "a", "b", "ab", "c", "ac", "bc", "abc")
design2$BC<-design2$B * design2$C
design2$ABC<-design2$A * design2$B * design2$C

# Data Input
dat1<-expand.grid(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1))
dat1$tool_life<-c(22, 32, 35, 55, 44, 40, 60, 39)
dat1$ABC<-dat1$A * dat1$B * dat1$C
dat1$blocks1<-ifelse(dat1$ABC == -1, 1, 2)
dat1$A<-as.factor(dat1$A)
dat1$B<-as.factor(dat1$B)
dat1$C<-as.factor(dat1$C)
dat1$blocks1<-as.factor(dat1$blocks1)

# Problem 3
library(FrF2)
model1<-lm(tool_life~blocks1 + A + B + C + A:B + A:C + B:C, data = dat1)
DanielPlot(model1, half = TRUE, block = TRUE, autolab = FALSE)