Answer 14.3
Here, the machine (factor A - fixed effect) has 3 levels (I) and splindle (factor B - random effect) has 2 levels (J) and the number of replicates are 4 (K).
The model equation is:
\(Y_{ijk}\) = \(\mu\) + \(\alpha_i\) + \(\beta_{j(i)}\) + \(\epsilon_{ijk}\)
Entering Data:
Machine <- c(rep(1,8), rep(2,8), rep(3,8))
Spindle <- rep(c(rep(1,4), rep(2,4)), 3)
Values <- 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)
Machine<-as.fixed(Machine)
Spindle<-as.random(Spindle)
Dat14.3 <- data.frame(Machine, Spindle, Values)
Dat14.3
## Machine Spindle Values
## 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
Stating Hypothesis:
Hypothesis for nested factor - Spindle:
- Null Hypothesis: \(\sigma^2_\beta = 0\)
- Alternate Hypothesis: \(\sigma^2_\beta\) \(\neq 0\)
Therefore, we see that the p-value for spindle nested in machine is = 0.0004428 < alpha = 0.05. Hence, we reject the null hypothesis & conclude that spindle does have a significant effect on the model.
The p-value for machine is = 0.2915630 > alpha = 0.05. Hence, we fail to reject the null hypothesis & conclude that machine does not have a significant effect on the model.
Also, from the above plots we can infer that the data is fairly normally distributed, although the assumption of constant variance does not seem to be satisfied.
Source Code:
library(GAD)
Machine <- c(rep(1,8), rep(2,8), rep(3,8))
Spindle <- rep(c(rep(1,4), rep(2,4)), 3)
Values <- 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)
Machine<-as.fixed(Machine)
Spindle<-as.random(Spindle)
Dat14.3 <- data.frame(Machine, Spindle, Values)
Dat14.3
Model <- lm(Values~Machine+Spindle%in%Machine)
gad(Model)
plot(Model)