Problem
A manufacturing engineer is studying the dimensional variability of a particular component that is produced on three machines. Each machine has two spindles, and four components are randomly selected from each spindle. The results follow. Analyze the data, assuming that machines and spindles are fixed factors.
The problem is a nested design, in which the principal factor is the machine and the nested factor within the machine is the spindle.
Model Equation:
\(Y_{i,j,k} = \mu + \alpha _{i} + \beta _{j(i)}+ \epsilon _{i,j,k}\)
mach<-c(rep(1,8),rep(2,8),rep(3,8))
spin<-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)
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.
dat1<-data.frame(mach,spin,obs)
mach<-as.fixed(mach)
spin<-as.random(spin)
model1<-lm(obs~mach+spin%in%mach)
gad(model1)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## mach 2 55.75 27.8750 1.9114 0.2915630
## mach:spin 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
Assume alpha 0.05
From the analysis we see that the p value of spindle is less than alpha, hence we reject the null hypothesis and conclude that the spindle has significant effect.
The p value of machine is greater than alpha hence it does has a significant effect on the model.