1 Problem

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

A<-c(-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1)
B<-c(-1,-1,+1,+1,-1,-1,+1,+1,-1,-1,+1,+1,-1,-1,+1,+1)
C<-c(-1,-1,-1,-1,+1,+1,+1,+1,-1,-1,-1,-1,+1,+1,+1,+1)
D<-c(-1,-1,-1,-1,-1,-1,-1,-1,+1,+1,+1,+1,+1,+1,+1,+1)
yield_lbs<-c(12,18,13,16,17,15,20,15,10,25,13,24,19,21,17,23)
dat<-data.frame(A,B,C,D,yield_lbs)
mod<-lm(yield_lbs~A*B*C*D, data=dat)
coef(mod)
##   (Intercept)             A             B             C             D 
##  1.737500e+01  2.250000e+00  2.500000e-01  1.000000e+00  1.625000e+00 
##           A:B           A:C           B:C           A:D           B:D 
## -3.750000e-01 -2.125000e+00  1.250000e-01  2.000000e+00 -1.027824e-16 
##           C:D         A:B:C         A:B:D         A:C:D         B:C:D 
## -1.595946e-16  5.000000e-01  3.750000e-01 -1.250000e-01 -3.750000e-01 
##       A:B:C:D 
##  5.000000e-01

1.1 part a

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

halfnormal(mod)

## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A   A:C A:D D

1.2 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.

test_not_significant<-lm(yield_lbs~(A+D+(A*C)+(A*D)),data = dat)
halfnormal(test_not_significant)
## Warning in halfnormal.lm(test_not_significant): halfnormal not recommended for
## models with more residual df than model df

## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A   A:C A:D D
anova(test_not_significant)
## Analysis of Variance Table
## 
## Response: yield_lbs
##           Df Sum Sq Mean Sq F value    Pr(>F)    
## A          1  81.00  81.000 49.8462 3.456e-05 ***
## D          1  42.25  42.250 26.0000 0.0004647 ***
## C          1  16.00  16.000  9.8462 0.0105485 *  
## A:C        1  72.25  72.250 44.4615 5.583e-05 ***
## A:D        1  64.00  64.000 39.3846 9.193e-05 ***
## Residuals 10  16.25   1.625                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

1.3 Source code

library(DoE.base)
A<-c(-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1,-1,+1)
B<-c(-1,-1,+1,+1,-1,-1,+1,+1,-1,-1,+1,+1,-1,-1,+1,+1)
C<-c(-1,-1,-1,-1,+1,+1,+1,+1,-1,-1,-1,-1,+1,+1,+1,+1)
D<-c(-1,-1,-1,-1,-1,-1,-1,-1,+1,+1,+1,+1,+1,+1,+1,+1)
yield_lbs<-c(12,18,13,16,17,15,20,15,10,25,13,24,19,21,17,23)
dat<-data.frame(A,B,C,D,yield_lbs)
mod<-lm(yield_lbs~A*B*C*D, data=dat)
coef(mod)
halfnormal(mod)

test_not_significant<-lm(yield_lbs~(A+D+(A*C)+(A*D)),data = dat)
halfnormal(test_not_significant)
anova(test_not_significant)