In a process development study on yield, four factors were studied, each at two levels: time (A), concentration (B), pressure (C), and temperature (D).
dat <- data.frame(
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 = c(12, 18, 13, 16, 17, 15, 20, 15, 10, 25, 13, 24, 19, 21, 17, 23) )
mod <- lm(Yield ~ 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
halfnormal(mod)
##
## Significant effects (alpha=0.05, Lenth method):
## [1] A A:C A:D D
The significant effects seem to be A, AC, AD, and D as shown in the half normal plot.