1 Introduction

In a process development study on yield, four factors were studied, each at two levels: time (A), concentration (B), pressure (C), and temperature (D).

runnum<-c(1:16)
runact<-c(5,9,8,13,3,7,14,1,6,11,2,15,4,16,10,12)
design<- expand.grid(A = c(-1, 1),
                      B = c(-1, 1),
                      C = c(-1, 1),
                      D = c(-1, 1))
yield<-c(12,18,13,16,17,15,20,15,10,25,13,24,19,21,17,23)
df<-data.frame(runnum,runact,design,yield)
df
##    runnum runact  A  B  C  D yield
## 1       1      5 -1 -1 -1 -1    12
## 2       2      9  1 -1 -1 -1    18
## 3       3      8 -1  1 -1 -1    13
## 4       4     13  1  1 -1 -1    16
## 5       5      3 -1 -1  1 -1    17
## 6       6      7  1 -1  1 -1    15
## 7       7     14 -1  1  1 -1    20
## 8       8      1  1  1  1 -1    15
## 9       9      6 -1 -1 -1  1    10
## 10     10     11  1 -1 -1  1    25
## 11     11      2 -1  1 -1  1    13
## 12     12     15  1  1 -1  1    24
## 13     13      4 -1 -1  1  1    19
## 14     14     16  1 -1  1  1    21
## 15     15     10 -1  1  1  1    17
## 16     16     12  1  1  1  1    23

2 Part a

Display the half normal plot for this data and determine which factors appear to be significant.

library(DoE.base)
model1<-lm(yield~A*B*C*D, data = df)
halfnormal(model1)

The results of the half normal plot show that the two factor interactions between A:D and A:C appear to be significant. The main effects A and D are also significant but these main effects are dependent of each other due to the presence of the significant two factor interactions.

3 Part b

Pull terms that do not appear to be significant into error and test for the significance of the other effects at the 0.05 level of significance.

The half normal plot results in Part a show that there are no significant four factor or 3 factor interactions; therefore, these will be pulled into the error of our model.

model2<-lm(yield~A*B+A*C+A*D+B*C+B*D+C*D,data = df)
summary(model2)
## 
## Call:
## lm.default(formula = yield ~ A * B + A * C + A * D + B * C + 
##     B * D + C * D, data = df)
## 
## Residuals:
##      1      2      3      4      5      6      7      8      9     10     11 
##  0.125  0.625  0.125 -0.875 -0.875  0.125  0.625  0.125 -1.125  0.375  0.875 
##     12     13     14     15     16 
## -0.125  1.875 -1.125 -1.625  0.875 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  1.738e+01  3.992e-01  43.523 1.21e-07 ***
## A            2.250e+00  3.992e-01   5.636  0.00244 ** 
## B            2.500e-01  3.992e-01   0.626  0.55864    
## C            1.000e+00  3.992e-01   2.505  0.05416 .  
## D            1.625e+00  3.992e-01   4.070  0.00963 ** 
## A:B         -3.750e-01  3.992e-01  -0.939  0.39068    
## A:C         -2.125e+00  3.992e-01  -5.323  0.00313 ** 
## A:D          2.000e+00  3.992e-01   5.010  0.00407 ** 
## B:C          1.250e-01  3.992e-01   0.313  0.76684    
## B:D          1.874e-16  3.992e-01   0.000  1.00000    
## C:D         -2.776e-16  3.992e-01   0.000  1.00000    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.597 on 5 degrees of freedom
## Multiple R-squared:  0.9563, Adjusted R-squared:  0.8689 
## F-statistic: 10.94 on 10 and 5 DF,  p-value: 0.008256

The interaction effects B:D and C:D will both be pulled into the model error since they are the most insignificant two factor interactions with p-values equal to 1.

model3<-lm(yield~A*B+A*C+A*D+B*C,data = df)
summary(model3)
## 
## Call:
## lm.default(formula = yield ~ A * B + A * C + A * D + B * C, data = df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -1.625 -0.875  0.125  0.625  1.875 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  17.3750     0.3374  51.497 2.73e-10 ***
## A             2.2500     0.3374   6.669 0.000286 ***
## B             0.2500     0.3374   0.741 0.482829    
## C             1.0000     0.3374   2.964 0.020991 *  
## D             1.6250     0.3374   4.816 0.001930 ** 
## A:B          -0.3750     0.3374  -1.111 0.303091    
## A:C          -2.1250     0.3374  -6.298 0.000405 ***
## A:D           2.0000     0.3374   5.928 0.000583 ***
## B:C           0.1250     0.3374   0.370 0.721982    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.35 on 7 degrees of freedom
## Multiple R-squared:  0.9563, Adjusted R-squared:  0.9064 
## F-statistic: 19.15 on 8 and 7 DF,  p-value: 0.0004218

The interaction effect B:C is the next insignificant two factor interaction that will be pulled into the model error since it has the largest p-value = 0.721982.

model4<-lm(yield~A+B+C+D+A*B+A*C+A*D,data = df)
summary(model4)
## 
## Call:
## lm.default(formula = yield ~ A + B + C + D + A * B + A * C + 
##     A * D, data = df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -1.500 -1.000  0.125  0.750  1.750 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  17.3750     0.3187  54.520 1.42e-11 ***
## A             2.2500     0.3187   7.060 0.000106 ***
## B             0.2500     0.3187   0.784 0.455366    
## C             1.0000     0.3187   3.138 0.013850 *  
## D             1.6250     0.3187   5.099 0.000931 ***
## A:B          -0.3750     0.3187  -1.177 0.273139    
## A:C          -2.1250     0.3187  -6.668 0.000158 ***
## A:D           2.0000     0.3187   6.276 0.000239 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.275 on 8 degrees of freedom
## Multiple R-squared:  0.9554, Adjusted R-squared:  0.9165 
## F-statistic: 24.51 on 7 and 8 DF,  p-value: 8.447e-05

The interaction effect A:B is the next insignificant two factor interaction that will be pulled into the model error since it has the largest p-value = 0.273139.

model5<-lm(yield~A+B+C+D+A*C+A*D,data = df)
summary(model5)
## 
## Call:
## lm.default(formula = yield ~ A + B + C + D + A * C + A * D, data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3750 -0.9375  0.1250  0.9375  1.3750 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  17.3750     0.3254  53.391 1.43e-12 ***
## A             2.2500     0.3254   6.914 6.96e-05 ***
## B             0.2500     0.3254   0.768 0.462036    
## C             1.0000     0.3254   3.073 0.013292 *  
## D             1.6250     0.3254   4.993 0.000746 ***
## A:C          -2.1250     0.3254  -6.530 0.000108 ***
## A:D           2.0000     0.3254   6.146 0.000170 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.302 on 9 degrees of freedom
## Multiple R-squared:  0.9477, Adjusted R-squared:  0.9129 
## F-statistic:  27.2 on 6 and 9 DF,  p-value: 2.796e-05

Using an alpha = 0.05 we have two significant two factor interactions, A:C and A:D. The p-values for these interactions is the following:

  • A:C p-value = 0.000108

  • A:D p-value = 0.000170

4 Complete R Code

# Analysis Data

runnum<-c(1:16)
runact<-c(5,9,8,13,3,7,14,1,6,11,2,15,4,16,10,12)
design<- expand.grid(A = c(-1, 1),
                      B = c(-1, 1),
                      C = c(-1, 1),
                      D = c(-1, 1))
yield<-c(12,18,13,16,17,15,20,15,10,25,13,24,19,21,17,23)
df<-data.frame(runnum,runact,design,yield)
df

# Part a

library(DoE.base)
model1<-lm(yield~A*B*C*D, data = df)
halfnormal(model1)

# Part b

model2<-lm(yield~A*B+A*C+A*D+B*C+B*D+C*D,data = df)
summary(model2)

model3<-lm(yield~A*B+A*C+A*D+B*C,data = df)
summary(model3)

model4<-lm(yield~A+B+C+D+A*B+A*C+A*D,data = df)
summary(model4)

model5<-lm(yield~A+B+C+D+A*C+A*D,data = df)
summary(model5)