6.8

time <- rep(c(12, 18), each = 6)
medium <- c(rep(1,6),rep(1,6),rep(2,6),rep(2,6))
growth <- c(21,22,23,28,20,26,37,39,38,38,35,36,25,26,24,25,29,27,31,34,29,33,30,35)
time<-as.factor(time)
medium<-as.factor(medium)
data <- data.frame(time, medium, growth)
data
##    time medium growth
## 1    12      1     21
## 2    12      1     22
## 3    12      1     23
## 4    12      1     28
## 5    12      1     20
## 6    12      1     26
## 7    18      1     37
## 8    18      1     39
## 9    18      1     38
## 10   18      1     38
## 11   18      1     35
## 12   18      1     36
## 13   12      2     25
## 14   12      2     26
## 15   12      2     24
## 16   12      2     25
## 17   12      2     29
## 18   12      2     27
## 19   18      2     31
## 20   18      2     34
## 21   18      2     29
## 22   18      2     33
## 23   18      2     30
## 24   18      2     35
model <- aov(growth~time+medium+time*medium, data = data)
summary(model)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## time         1  590.0   590.0 115.506 9.29e-10 ***
## medium       1    9.4     9.4   1.835 0.190617    
## time:medium  1   92.0    92.0  18.018 0.000397 ***
## Residuals   20  102.2     5.1                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model,1)

plot(model,2)

Time and the interaction between time and medium appear to have significant effects on growth, at the 0.05 significance level.

The residual plots shows a fairly normal distribution and the residuals looks to be constant.

6.12

A <- rep(c(-1, 1, -1, 1), each = 4)
B <- rep(c(-1, -1, 1, 1), each = 4)
thickness <- c(14.037, 16.165, 13.972, 13.907, 
               13.880, 13.860, 14.032, 13.914, 
               14.821, 14.757, 14.843, 14.878, 
               14.888, 14.921, 14.415, 14.932)
A<-as.factor(A)
B<-as.factor(B)
dat<-data.frame(A,B,thickness)
dat
##     A  B thickness
## 1  -1 -1    14.037
## 2  -1 -1    16.165
## 3  -1 -1    13.972
## 4  -1 -1    13.907
## 5   1 -1    13.880
## 6   1 -1    13.860
## 7   1 -1    14.032
## 8   1 -1    13.914
## 9  -1  1    14.821
## 10 -1  1    14.757
## 11 -1  1    14.843
## 12 -1  1    14.878
## 13  1  1    14.888
## 14  1  1    14.921
## 15  1  1    14.415
## 16  1  1    14.932
n <- 4 # Number of replicates
total_ab <- sum(thickness[A == 1 & B == 1])
total_a <- sum(thickness[A == 1 & B == -1])
total_b <- sum(thickness[A == -1 & B == 1])
total_1 <- sum(thickness[A == -1 & B == -1])

# Factor effects
effect_A <- (total_ab + total_a - total_b - total_1) / (2 * n)
effect_B <- (total_ab + total_b - total_a - total_1) / (2 * n)
interaction_AB <- (total_ab - total_a - total_b + total_1) / (2 * n)
effect_A
## [1] -0.31725
effect_B
## [1] 0.586
interaction_AB
## [1] 0.2815
model <- aov(thickness ~ A * B, data = data)
summary(model)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## A            1  0.403  0.4026   1.262 0.2833  
## B            1  1.374  1.3736   4.305 0.0602 .
## A:B          1  0.317  0.3170   0.994 0.3386  
## Residuals   12  3.828  0.3190                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model,1)

plot(model,2)

Factor B appears to be the most significant factor, even though it still doesn’t meet the 0.05 sig. level.

regression_model <- lm(thickness ~ A * B, data = data)
coef(regression_model)
## (Intercept)          A1          B1       A1:B1 
##    14.52025    -0.59875     0.30450     0.56300

Observation 2 is an outlier in the normal probability plot and the plot of residual versus predicted.

Investigate the cause (e.g., experimental error, data recording issue); replace it with the average of the observations from that group.

6.21

obs <- c(10,0,4,0,0,5,6.5,16.5,4.5,19.5,15,41.5,8,21.5,0,18,18,16.5,6,10,0,20.5,18.5,4.5,18,18,16,39,4.5,10.5,0,5,14,4.5,1,34,18.5,18,7.5,0,14.5,16,8.5,6.5,6.5,6.5,0,7,12.5,17.5,14.5,11,19.5,20,6,23.5,10,5.5,0,3.5,10,0,4.5,10,19,20.5,12,25.5,16,29.5,0,8,0,10,0.5,7,13,15.5,1,32.5,16,17.5,14,21.5,15,19,10,8,17.5,7,9,8.5,41,24,4,18.5,18.5,33,5,0,11,10,0,8,6,36,3,36,14,16,6.5,8)
A <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B <- c(rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2))
C <- c(rep(1,4),rep(-1,4),rep(1,4),rep(-1,4))
D <- c(rep(1,8),rep(-1,8))
dat <- data.frame(A,B,C,D,obs)
model <- aov(obs~A*B*C*D,data = dat)
summary(model)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## A            1    917   917.1  10.588 0.00157 **
## B            1    388   388.1   4.481 0.03686 * 
## C            1    145   145.1   1.676 0.19862   
## D            1      1     1.4   0.016 0.89928   
## A:B          1    219   218.7   2.525 0.11538   
## A:C          1     12    11.9   0.137 0.71178   
## B:C          1    115   115.0   1.328 0.25205   
## A:D          1     94    93.8   1.083 0.30066   
## B:D          1     56    56.4   0.651 0.42159   
## C:D          1      2     1.6   0.019 0.89127   
## A:B:C        1      7     7.3   0.084 0.77294   
## A:B:D        1    113   113.0   1.305 0.25623   
## A:C:D        1     39    39.5   0.456 0.50121   
## B:C:D        1     34    33.8   0.390 0.53386   
## A:B:C:D      1     96    95.6   1.104 0.29599   
## Residuals   96   8316    86.6                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Length of the put and the type of putter have a significant effect at 0.05 sig level.

plot(model,1)

plot(model,2)

From the plots we can see the assumptions of constant variance and normality are violated to some extent.

6.36

obs1 <- c(1.92,11.28,1.09,5.75,2.13,9.53,1.03,5.35,1.60,11.73,1.16,4.68,2.16,9.11,1.07,5.30)
A1 <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B1 <- c(rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2))
C1 <- c(rep(-1,4),rep(1,4),rep(-1,4),rep(1,4))
D1 <- c(rep(-1,8),rep(1,8))
dat1 <- data.frame(A1,B1,C1,D1,obs1)
dat1
##    A1 B1 C1 D1  obs1
## 1  -1 -1 -1 -1  1.92
## 2   1 -1 -1 -1 11.28
## 3  -1  1 -1 -1  1.09
## 4   1  1 -1 -1  5.75
## 5  -1 -1  1 -1  2.13
## 6   1 -1  1 -1  9.53
## 7  -1  1  1 -1  1.03
## 8   1  1  1 -1  5.35
## 9  -1 -1 -1  1  1.60
## 10  1 -1 -1  1 11.73
## 11 -1  1 -1  1  1.16
## 12  1  1 -1  1  4.68
## 13 -1 -1  1  1  2.16
## 14  1 -1  1  1  9.11
## 15 -1  1  1  1  1.07
## 16  1  1  1  1  5.30

a.

library(DoE.base)
## Loading required package: grid
## Loading required package: conf.design
## Registered S3 method overwritten by 'DoE.base':
##   method           from       
##   factorize.factor conf.design
## 
## Attaching package: 'DoE.base'
## The following objects are masked from 'package:stats':
## 
##     aov, lm
## The following object is masked from 'package:graphics':
## 
##     plot.design
## The following object is masked from 'package:base':
## 
##     lengths
model1 <- lm(obs1~A1*B1*C1*D1,data = dat1)
coef(model1)
## (Intercept)          A1          B1          C1          D1       A1:B1 
##    4.680625    3.160625   -1.501875   -0.220625   -0.079375   -1.069375 
##       A1:C1       B1:C1       A1:D1       B1:D1       C1:D1    A1:B1:C1 
##   -0.298125    0.229375   -0.056875   -0.046875    0.029375    0.344375 
##    A1:B1:D1    A1:C1:D1    B1:C1:D1 A1:B1:C1:D1 
##   -0.096875   -0.010625    0.094375    0.141875
halfnormal(model1)
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A1       B1       A1:B1    A1:B1:C1

qqnorm(coef(model1))
qqline(coef(model1))

aov_mod <- aov(obs1~A1+B1+C1+A1*B1+A1*B1*C1,data = dat1)
plot(aov_mod)

## hat values (leverages) are all = 0.5
##  and there are no factor predictors; no plot no. 5

The model does not seem to satisfy the assumption of constant variance or normal distribution.

c.

obs_ln <- log(obs1)
mod <- lm(obs_ln~A1+B1+C1+A1*B1+A1*B1*C1)
coef(mod)
##  (Intercept)           A1           B1           C1        A1:B1        A1:C1 
##  1.185417116  0.812870345 -0.314277554 -0.006408558 -0.024684570 -0.039723700 
##        B1:C1     A1:B1:C1 
## -0.004225796  0.063434408
halfnormal(mod)
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A1       B1       A1:B1:C1 A1:C1    e7       e6

qqnorm(coef(mod))
qqline(coef(mod))

The log transformation has improved the results.

d.

mod <- lm(obs_ln~A1+B1+C1+A1*B1*C1+A1*C1)
coef(mod)
##  (Intercept)           A1           B1           C1        A1:B1        A1:C1 
##  1.185417116  0.812870345 -0.314277554 -0.006408558 -0.024684570 -0.039723700 
##        B1:C1     A1:B1:C1 
## -0.004225796  0.063434408

6.39

y <- c(8.11,5.56,5.77,5.82,9.17,7.8,3.23,5.69,8.82,14.23,9.2,8.94,8.68,11.49,6.25,9.12,7.93,5,7.47,12,9.86,3.65,6.4,11.61,12.43,17.55,8.87,25.38,13.06,18.85,11.78,26.05)
A2 <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B2 <- c(rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2))
C2 <- c(rep(-1,4),rep(1,4),rep(-1,4),rep(1,4),rep(-1,4),rep(1,4),rep(-1,4),rep(1,4))
D2 <- c(rep(-1,8),rep(1,8),rep(-1,8),rep(1,8))
E2 <- c(rep(-1,16),rep(1,16))
dat2 <- data.frame(A2,B2,C2,D2,E2,y)

a.

model3 <- aov(y~A2*B2*C2*D2*E2,data = dat2)
halfnormal(model3)
## 
## Significant effects (alpha=0.05, Lenth method):
##  [1] D2       E2       A2:D2    A2       D2:E2    B2:E2    A2:B2    A2:B2:E2 
## 
##  [9] A2:E2    A2:D2:E2

b.

model4 <- aov(y~A2*B2*D2*E2,data = dat2)
plot(model4)

## hat values (leverages) are all = 0.5
##  and there are no factor predictors; no plot no. 5

The assumption of constant variance seems to be violated.

c.

summary(model4)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## A2           1  83.56   83.56  57.233 1.14e-06 ***
## B2           1   0.06    0.06   0.041 0.841418    
## D2           1 285.78  285.78 195.742 2.16e-10 ***
## E2           1 153.17  153.17 104.910 1.97e-08 ***
## A2:B2        1  48.93   48.93  33.514 2.77e-05 ***
## A2:D2        1  88.88   88.88  60.875 7.66e-07 ***
## B2:D2        1   0.01    0.01   0.004 0.950618    
## A2:E2        1  33.76   33.76  23.126 0.000193 ***
## B2:E2        1  52.71   52.71  36.103 1.82e-05 ***
## D2:E2        1  61.80   61.80  42.328 7.24e-06 ***
## A2:B2:D2     1   3.82    3.82   2.613 0.125501    
## A2:B2:E2     1  44.96   44.96  30.794 4.40e-05 ***
## A2:D2:E2     1  26.01   26.01  17.815 0.000650 ***
## B2:D2:E2     1   0.05    0.05   0.035 0.854935    
## A2:B2:D2:E2  1   5.31    5.31   3.634 0.074735 .  
## Residuals   16  23.36    1.46                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We can see that factors A, D, E, and interactions AB, AD, AE, BE, DE, ABE, and ADE are significant at 0.05 level.

d.

lm_mod <- lm(y~A2+D2+E2+A2*B2+A2*E2+A2*D2+B2*E2+D2*E2+A2*B2*E2+A2*D2*E2,data = dat2)
coef(lm_mod)
## (Intercept)          A2          D2          E2          B2       A2:B2 
##  10.1803125   1.6159375   2.9884375   2.1878125   0.0434375   1.2365625 
##       A2:E2       A2:D2       E2:B2       D2:E2    A2:E2:B2    A2:D2:E2 
##   1.0271875   1.6665625   1.2834375   1.3896875   1.1853125   0.9015625

7.12

obs <- c(10,0,4,0,0,5,6.5,16.5,4.5,19.5,15,41.5,8,21.5,0,18,18,16.5,6,10,0,20.5,18.5,4.5,18,18,16,39,4.5,10.5,0,5,14,4.5,1,34,18.5,18,7.5,0,14.5,16,8.5,6.5,6.5,6.5,0,7,12.5,17.5,14.5,11,19.5,20,6,23.5,10,5.5,0,3.5,10,0,4.5,10,19,20.5,12,25.5,16,29.5,0,8,0,10,0.5,7,13,15.5,1,32.5,16,17.5,14,21.5,15,19,10,8,17.5,7,9,8.5,41,24,4,18.5,18.5,33,5,0,11,10,0,8,6,36,3,36,14,16,6.5,8)
A <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B <- c(rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2),rep(1,2),rep(-1,2))
C <- c(rep(1,4),rep(-1,4),rep(1,4),rep(-1,4))
D <- c(rep(1,8),rep(-1,8))
block <- c(rep(1,16),rep(2,16),rep(3,16),rep(4,16),rep(5,16),rep(6,16),rep(7,16))
dat <- data.frame(A,B,C,D,block,obs)
lm_mod <- lm(obs~A*B*C*D+block,data = dat)
library(DoE.base)
halfnormal(lm_mod)
## Warning in halfnormal.lm(lm_mod): halfnormal not recommended for models with
## more residual df than model df
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A     lof10 block lof65 lof9  B     lof69

aov_mod <- aov(obs~A*B*C*D+block,data = dat)
summary(aov_mod)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## A            1    917   917.1  10.673 0.00151 **
## B            1    388   388.1   4.517 0.03616 * 
## C            1    145   145.1   1.689 0.19687   
## D            1      1     1.4   0.016 0.89888   
## block        1    152   152.1   1.769 0.18663   
## A:B          1    219   218.7   2.545 0.11398   
## A:C          1     12    11.9   0.138 0.71068   
## B:C          1    115   115.0   1.338 0.25020   
## A:D          1     94    93.8   1.092 0.29877   
## B:D          1     56    56.4   0.657 0.41976   
## C:D          1      2     1.6   0.019 0.89084   
## A:B:C        1      7     7.3   0.084 0.77206   
## A:B:D        1    113   113.0   1.315 0.25437   
## A:C:D        1     39    39.5   0.459 0.49952   
## B:C:D        1     34    33.8   0.393 0.53224   
## A:B:C:D      1     96    95.6   1.113 0.29411   
## Residuals   95   8164    85.9                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

7.20

library(FrF2)
design <- FrF2(nruns = 64, nfactors = 6, factor.names = c("A", "B", "C", "D", "E", "F"))
## creating full factorial with 64 runs ...

Choosing ABCE and ABDF as the block generators, confound with CDEF

Block 1:  ABCE = -1, ABDF = -1 

{EF, DE, CF, CD, B, BDF, BCE, BCDEF, A, ADF, ACE, ACDEF, ABEF, ABDE, ABCF, ABCD}

Block 2:  ABCE = -1, ABDF = +1 

{E, DEF, C, CDF, BF, BD, BCEF, BCDE, AF, AD, ACEF, ACDE, ABE, ABDEF, ABC, ABCDF}

Block 3:  ABCE = +1, ABDF = -1 

{F, D, CEF, CDE, BE, BDEF, BC, BCDF, AE, ADEF, AC, ACDF, ABF, ABD, ABCEF, ABCDE}

Block 4:  ABCE = +1, ABDF = +1 

{1, DF, CE, CDEF, BEF, BDE, BCF, BCD, AEF, ADE, ACF, ACD, AB, ABDF, ABCE, ABCDEF}

7.21

Block 1 (ABCD = -1, ACE = -1, ABEF = -1)

{DF, CE, B, BCDEF, AEF, ACD, ABDE, ABCF}

Block 2 (ABCD = -1, ACE = -1, ABEF = +1)

{D, CEF, BF, BCDE, AE, ACDF, ABDEF, ABC}

Block 3 (ABCD = -1, ACE = +1, ABEF = -1)

{DE, CF, BEF, BCD, A, ACDEF, ABDF, ABCE}

Block 4 (ABCD = -1, ACE = +1, ABEF = +1)

{DEF, C, BE, BCDF, AF, ACDE, ABD, ABCEF}

Block 5 (ABCD = +1, ACE = -1, ABEF = -1)

{F, CDE, BD, BCEF, ADEF, AC, ABE, ABCDF}

Block 6 (ABCD = +1, ACE = -1, ABEF = +1)

{1, CDEF, BDF, BCE, ADE, ACF, ABEF, ABCD}

Block 7 (ABCD = +1, ACE = +1, ABEF = -1)

{E, CDF, BDEF, BC, AD, ACEF, ABF, ABCDE}

Block 8 (ABCD = +1, ACE = +1, ABEF = +1)

{EF, CD, BDE, BCF, ADF, ACE, AB, ABCDEF}

8.2

design <- data.frame(
  A = c(-1, 1, -1, 1, -1, 1, -1, 1),  
  B = c(-1, -1, 1, 1, -1, -1, 1, 1),  
  C = c(-1, -1, -1, -1, 1, 1, 1, 1),  
  D = c(-1, 1, 1, -1, 1, -1, -1, 1),  # D = ABC
  Response = c(7.037, 14.707, 11.635, 17.273, 10.403, 4.368, 9.360, 13.440) # Replicate I
)

print(design)
##    A  B  C  D Response
## 1 -1 -1 -1 -1    7.037
## 2  1 -1 -1  1   14.707
## 3 -1  1 -1  1   11.635
## 4  1  1 -1 -1   17.273
## 5 -1 -1  1  1   10.403
## 6  1 -1  1 -1    4.368
## 7 -1  1  1 -1    9.360
## 8  1  1  1  1   13.440
model <- lm(Response ~ A + B + C + A:B + A:C + B:C, data = design)
summary(model)  
## 
## Call:
## lm.default(formula = Response ~ A + B + C + A:B + A:C + B:C, 
##     data = design)
## 
## Residuals:
##      1      2      3      4      5      6      7      8 
## -1.518  1.518  1.518 -1.518  1.518 -1.518 -1.518  1.518 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  11.0279     1.5184   7.263   0.0871 .
## A             1.4191     1.5184   0.935   0.5215  
## B             1.8991     1.5184   1.251   0.4294  
## C            -1.6351     1.5184  -1.077   0.4764  
## A:B           1.0104     1.5184   0.665   0.6262  
## A:C          -1.9079     1.5184  -1.257   0.4279  
## B:C           0.1081     1.5184   0.071   0.9547  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.295 on 1 degrees of freedom
## Multiple R-squared:  0.849,  Adjusted R-squared:  -0.05671 
## F-statistic: 0.9374 on 6 and 1 DF,  p-value: 0.6585
anova_results <- anova(model)
print(anova_results)
## Analysis of Variance Table
## 
## Response: Response
##           Df  Sum Sq Mean Sq F value Pr(>F)
## A          1 16.1113 16.1113  0.8735 0.5215
## B          1 28.8534 28.8534  1.5644 0.4294
## C          1 21.3891 21.3891  1.1597 0.4764
## A:B        1  8.1669  8.1669  0.4428 0.6262
## A:C        1 29.1199 29.1199  1.5789 0.4279
## B:C        1  0.0935  0.0935  0.0051 0.9547
## Residuals  1 18.4437 18.4437
plot(model)

## hat values (leverages) are all = 0.875
##  and there are no factor predictors; no plot no. 5

8.24

A B C D E Block

1 - - - - + 1

2 + - - - - 2

3 - + - - - 2

4 + + - - + 1

5 - - + - - 2

6 + - + - + 1

7 - + + - + 1

8 + + + - - 2

9 - - - + - 2

10 + - - + + 1

11 - + - + + 1

12 + + - + - 2

13 - - + + + 1

14 + - + + - 2

15 - + + + - 2

16 + + + + + 1

Main effects

A

B

C

D

E = A:B:C:D

Two-factor interactions

A:B = C:D*Block

A:C = B:D*Block

A:D = B:C*Block

A:E = B:C:D

B:C = A:D*Block

B:D = A:C*Block

B:E = A:C:D

C:D = A:B*Block

C:E = A:B:D

D:E = A:B:C

Block defining relation

Block = A:B:C:D

No main effects confounded with blocks.

8.25

main

A

B

C

D

E

F = A:B:C

G = B:C:D

interaction

A:B = F:G*Block

A:C = B:D*Block

A:D = B:C:G*Block

A:E = B:C:D:F*Block

Block

Block = F:G

No main effects confounded with blocks.

8.28

It’s a Fractional Factorial Design, with 6 factors and 16 runs. The resolution is IV. Fraction is 2 to the power of (6-2).

E = +/- ABC

F = +/- ACD

library(FrF2)
?FrF2

camber <- c(157.25, 48, 44, 55.75, 55.75, 230, 97.25, 225, 50.25, 85.25, 31.5, 160, 113.75, 92.75, 150.75, 115)
des.res4 <- FrF2(nruns = 16, nfactors = 6, generators = list(c(1, 2, 3), c(1, 3, 4)), randomize = FALSE)

des.res4
##     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.generators
aliasprint(des.res4)
## $legend
## [1] A=A B=B C=C D=D E=E F=F
## 
## $main
## character(0)
## 
## $fi2
## [1] AB=CE    AC=BE=DF AD=CF    AE=BC    AF=CD    BD=EF    BF=DE
des.res<-add.response(des.res4, camber)
summary(des.res)
## Call:
## FrF2(nruns = 16, nfactors = 6, generators = list(c(1, 2, 3), 
##     c(1, 3, 4)), randomize = FALSE)
## 
## Experimental design of type  FrF2.generators 
## 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
## 
## Responses:
## [1] camber
## 
## Design generating information:
## $legend
## [1] A=A B=B C=C D=D E=E F=F
## 
## $generators
## [1] E=ABC F=ACD
## 
## 
## Alias structure:
## $fi2
## [1] AB=CE    AC=BE=DF AD=CF    AE=BC    AF=CD    BD=EF    BF=DE   
## 
## 
## The design itself:
##     A  B  C  D  E  F camber
## 1  -1 -1 -1 -1 -1 -1 157.25
## 2   1 -1 -1 -1  1  1  48.00
## 3  -1  1 -1 -1  1 -1  44.00
## 4   1  1 -1 -1 -1  1  55.75
## 5  -1 -1  1 -1  1  1  55.75
## 6   1 -1  1 -1 -1 -1 230.00
## 7  -1  1  1 -1 -1  1  97.25
## 8   1  1  1 -1  1 -1 225.00
## 9  -1 -1 -1  1 -1  1  50.25
## 10  1 -1 -1  1  1 -1  85.25
## 11 -1  1 -1  1  1  1  31.50
## 12  1  1 -1  1 -1 -1 160.00
## 13 -1 -1  1  1  1 -1 113.75
## 14  1 -1  1  1 -1  1  92.75
## 15 -1  1  1  1 -1 -1 150.75
## 16  1  1  1  1  1  1 115.00
## class=design, type= FrF2.generators
DanielPlot(des.res, half=TRUE)

MEPlot(des.res, show.alias=TRUE)

camber_sd <- c(24.418, 20.976, 4.083, 25.025, 25.405, 63.635, 
               16.029, 40.289, 26.725, 25.921, 7.681, 31.122, 
               29.151, 6.753, 29.521, 17.455)
des.res4 <- FrF2(nruns = 16, nfactors = 6, generators = list(c(1, 2, 3), c(1, 3, 4)), randomize = FALSE)
des.res4
##     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.generators
aliasprint(des.res4)
## $legend
## [1] A=A B=B C=C D=D E=E F=F
## 
## $main
## character(0)
## 
## $fi2
## [1] AB=CE    AC=BE=DF AD=CF    AE=BC    AF=CD    BD=EF    BF=DE
des.res<-add.response(des.res4, camber_sd)
summary(des.res)
## Call:
## FrF2(nruns = 16, nfactors = 6, generators = list(c(1, 2, 3), 
##     c(1, 3, 4)), randomize = FALSE)
## 
## Experimental design of type  FrF2.generators 
## 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
## 
## Responses:
## [1] camber_sd
## 
## Design generating information:
## $legend
## [1] A=A B=B C=C D=D E=E F=F
## 
## $generators
## [1] E=ABC F=ACD
## 
## 
## Alias structure:
## $fi2
## [1] AB=CE    AC=BE=DF AD=CF    AE=BC    AF=CD    BD=EF    BF=DE   
## 
## 
## The design itself:
##     A  B  C  D  E  F camber_sd
## 1  -1 -1 -1 -1 -1 -1    24.418
## 2   1 -1 -1 -1  1  1    20.976
## 3  -1  1 -1 -1  1 -1     4.083
## 4   1  1 -1 -1 -1  1    25.025
## 5  -1 -1  1 -1  1  1    25.405
## 6   1 -1  1 -1 -1 -1    63.635
## 7  -1  1  1 -1 -1  1    16.029
## 8   1  1  1 -1  1 -1    40.289
## 9  -1 -1 -1  1 -1  1    26.725
## 10  1 -1 -1  1  1 -1    25.921
## 11 -1  1 -1  1  1  1     7.681
## 12  1  1 -1  1 -1 -1    31.122
## 13 -1 -1  1  1  1 -1    29.151
## 14  1 -1  1  1 -1  1     6.753
## 15 -1  1  1  1 -1 -1    29.521
## 16  1  1  1  1  1  1    17.455
## class=design, type= FrF2.generators
DanielPlot(des.res, half=TRUE)

# From the main effects plot for camber:
# A=-1, B=Not significant, C=-1, D=+1, E=+1, F=-1
  1. F has the largest and statistically significant effect on the average camber.

  2. No factor has a significant effect on the variability

  3. According to the Main Effects Plot, we can see that Factor F and Factor C have the most obvious effect on observation, even though only Factor F is significant. To reduce camber as much as possible, we can use lower level of Factor C and higher level of Factor F.

8.40

Each treatment combination is represented by factors labeled a, b, c, and d . This implies 4 factors were investigated.

 2^{4-1}  fractional factorial design.

resolution IV

Main effect of a: -0.5

Main effect of b: -0.25

Main effect of c: -0.25

Main effect of d: 2.5

The defining relation for this design is I = ABCD.

8.48

D=AB

E=BC

Resolution IV

8.60

D ~ BC

E ~ BCD

F ~ CD

G ~ BD