14.3)

The given design is Nested design where spindle is nested factor within the machine and machine is the principal factor.

we consider machine as fixed factor and nested spindle is random factor.

Model equation :

\(Y_{ijk}\) = \(\mu\) + \(\alpha_{i}\) + \(\beta_{j(i)}\) + \(\epsilon_{ijk}\)

library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
m <- c(rep(1,8),rep(2,8),rep(3,8))
s <- rep(c(rep(1,4),rep(2,4)),3)
obs14.3 <- 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(m,s,obs14.3)
dat
##    m s obs14.3
## 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

Hypothesis :

Nested Factor (Spindle) :

Null Hypothesis : \(H_{0}\) : \(\alpha\beta^{2}\) = 0

Alternate Hypothesis : \(H_{a}\) : \(\alpha\beta^{2}\) \(\neq\) 0

Principle Factor (Machine) :

Null Hypothesis : \(\alpha_{i}\) = 0

Alternative Hypothesis : \(\alpha_{i}\) \(\neq\) 0

Analysis :

m <- as.fixed(m)
s <- as.random(s)
model14.3 <- lm(obs14.3 ~ m + s%in%m)
gad(model14.3)
## Analysis of Variance Table
## 
## Response: obs14.3
##          Df Sum Sq Mean Sq F value    Pr(>F)    
## m         2  55.75 27.8750  1.9114 0.2915630    
## m:s       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

Plots :

library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.2.2
library(ggfortify)
## Warning: package 'ggfortify' was built under R version 4.2.2
autoplot(model14.3,col="red")

The assumption of constant variance is not significantly satisfied but, the data is fairly normally distributed.

The p-value of the principle factor is = 0.2915630 which is grater than \(\alpha\) = 0.05.So we fail to reject null hypothesis. The machine doesnโ€™t have significant effect on the model and the p-value for nested factor is 0.0004428 < \(\alpha\) = 0.05. We reject null hypothesis and conclude that spindle have significant effect on the given model.