Problem 5.13 in Montgomery, Design and Analysis of Experiments, 8th Edition.

There are two factors: Machine-4 levels, Operator 3-levels. The response is breaking strength of a synthetic fiber and the design is replicated 2 times.

Machine<-rep(seq(1,4),6)
Operator<-c(rep(1,8),rep(2,8),rep(3,8))
Response<-c(109,110,108,110,110,115,109,108,110,100,111,114,112,111,109,112,116,112,114,120,114,115,119,117)
data.frame(Machine, Operator,Response)
##    Machine Operator Response
## 1        1        1      109
## 2        2        1      110
## 3        3        1      108
## 4        4        1      110
## 5        1        1      110
## 6        2        1      115
## 7        3        1      109
## 8        4        1      108
## 9        1        2      110
## 10       2        2      100
## 11       3        2      111
## 12       4        2      114
## 13       1        2      112
## 14       2        2      111
## 15       3        2      109
## 16       4        2      112
## 17       1        3      116
## 18       2        3      112
## 19       3        3      114
## 20       4        3      120
## 21       1        3      114
## 22       2        3      115
## 23       3        3      119
## 24       4        3      117

The effect of the 4 specific machines on breaking strength is of interest; the effect of the 3 specific operators on breaking strength is of interest.

Use a Fixed Effects model – making inference on the specific levels of these two factors. First we have to install the package GAD.

library(GAD)
Machine<-as.fixed(Machine)
Operator<-as.random(Operator)
model<-aov(Response~Machine+Operator+Machine*Operator)
GAD::gad(model)
## $anova
## Analysis of Variance Table
## 
## Response: Response
##                  Df  Sum Sq Mean Sq F value   Pr(>F)   
## Machine           3  27.458   9.153  0.6893 0.590899   
## Operator          2 192.000  96.000 10.9194 0.001989 **
## Machine:Operator  6  79.667  13.278  1.5103 0.255497   
## Residuals        12 105.500   8.792                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Note: the summary of the aov is not correct, gives results for fixed instead of mixed effect model.

The effect of machine on breaking strength is of interest, the 4 were selected as random. The effect of operators on breaking strength is of interest, the 3 were selected as random as well.

Use a Random Effect model – making inference on the effect of machines and operator.

Machine<-as.random(Machine)
Operator<-as.random(Operator)
model<-aov(Response~Machine+Operator+Machine*Operator)
GAD::gad(model)
## $anova
## Analysis of Variance Table
## 
## Response: Response
##                  Df  Sum Sq Mean Sq F value  Pr(>F)  
## Machine           3  27.458   9.153  0.6893 0.59090  
## Operator          2 192.000  96.000  7.2301 0.02522 *
## Machine:Operator  6  79.667  13.278  1.5103 0.25550  
## Residuals        12 105.500   8.792                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1