In this nested design the model equation is as follows;
Effects = \(\mu + \alpha_i+\beta_j(i)+\epsilon_ijk\)
The null hypothesis is that for the burning rates there is no difference in the process used to manufacture them
The alternative is that there is at one of the processes is different from the others.
library(GAD)
## Warning: package 'GAD' was built under R version 4.1.3
## Loading required package: matrixStats
## Warning: package 'matrixStats' was built under R version 4.1.3
## Loading required package: R.methodsS3
## Warning: package 'R.methodsS3' was built under R version 4.1.3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
l <- c(1,2,3,4)
i <- c(1,2,3)
obs <- c(25, 19, 15, 15, 19, 23 ,18 ,35 ,14, 35, 38, 25,30, 28, 17, 16, 17, 24, 21, 27, 15, 21, 54, 29,26, 20, 14, 13, 14, 21, 17, 25, 20, 24, 50, 33)
batch <- c(rep(l,9))
process <- c(rep(1,4),rep(2,4),rep(3,4),rep(1,4),rep(2,4),rep(3,4),rep(1,4),rep(2,4),rep(3,4))
process <- as.fixed(process)
batch <- as.random(batch)
model <- lm(obs~process+batch%in%process)
summary(model)
##
## Call:
## lm(formula = obs ~ process + batch %in% process)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.333 -2.083 -0.500 2.333 8.333
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.000 2.511 10.752 1.17e-10 ***
## process2 -10.333 3.551 -2.910 0.00768 **
## process3 -10.667 3.551 -3.004 0.00615 **
## process1:batch2 -4.667 3.551 -1.314 0.20123
## process2:batch2 6.000 3.551 1.690 0.10406
## process3:batch2 10.333 3.551 2.910 0.00768 **
## process1:batch3 -11.667 3.551 -3.285 0.00312 **
## process2:batch3 2.000 3.551 0.563 0.57853
## process3:batch3 31.000 3.551 8.729 6.51e-09 ***
## process1:batch4 -12.333 3.551 -3.473 0.00197 **
## process2:batch4 12.333 3.551 3.473 0.00197 **
## process3:batch4 12.667 3.551 3.567 0.00156 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.349 on 24 degrees of freedom
## Multiple R-squared: 0.8585, Adjusted R-squared: 0.7936
## F-statistic: 13.23 on 11 and 24 DF, p-value: 1.177e-07
From running the experiment it is observed that all the processes are statistically different from each other when it comes to producing differing burn rates. With the process 3, batch 3 interaction having the strongest effect.