Probelm 14.3

library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.1 (2020-08-26 16:20:06 UTC) successfully loaded. See ?R.methodsS3 for help.
Machine <- c(rep(1,8),rep(2,8),rep(3,8))
Spindle <- rep(c(rep(1,4),rep(2,4)),3)
obs <- c(12,9,11,12,8,9,10,8,14,15,13,14,12,10,11,13,14,10,12,11,16,15,15,14)

Dat <- data.frame(Machine,Spindle,obs)
Dat
##    Machine Spindle obs
## 1        1       1  12
## 2        1       1   9
## 3        1       1  11
## 4        1       1  12
## 5        1       2   8
## 6        1       2   9
## 7        1       2  10
## 8        1       2   8
## 9        2       1  14
## 10       2       1  15
## 11       2       1  13
## 12       2       1  14
## 13       2       2  12
## 14       2       2  10
## 15       2       2  11
## 16       2       2  13
## 17       3       1  14
## 18       3       1  10
## 19       3       1  12
## 20       3       1  11
## 21       3       2  16
## 22       3       2  15
## 23       3       2  15
## 24       3       2  14
Machine <- as.fixed(Machine)
Spindle <- as.random(Spindle)
Model <- lm(obs~Machine+Spindle%in%Machine)
gad(Model)
## Analysis of Variance Table
## 
## Response: obs
##                 Df Sum Sq Mean Sq F value    Pr(>F)    
## Machine          2  55.75 27.8750  1.9114 0.2915630    
## Machine:Spindle  3  43.75 14.5833  9.9057 0.0004428 ***
## Residual        18  26.50  1.4722                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Model equation

Yi,j,k=μ+αi+βj(i)+ϵi,j,k

From the given problem we can see that this is a Nested design in which we can see that machine is the principal factor and spindle is the nested factor within the machine. So we are considering machine as a fixed factor and spindle as a random factor.

From the analysis we can see that the p-value for spindle is 0.0004428 which is less than 0.05 so, we reject the null hypothesis for the nested factor and we can conclude that spindle has a significant effect on dimensional variability of the component. On the other hand as visible from the p-value of the machine is 0.2915630 which is more than 0.05 so we can say that machine does not have a significant effect.