The model equation can be described as:
\[ y_{ijk}=\mu+\alpha_i+\beta_j+\epsilon_{ijk} \]
We want to test the hypotheses that only process is significant:
\[ H_0:\alpha=0\\ H_a:\alpha\neq 0 \]
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.
process <- c(rep(1:3,each=4,3))
batch <- c(rep(1:4,9))
obs <- c(rep(1:3, each=4*3))
response <- c(25,19,15,15,29,23,28,35,24,35,38,25,30,28,17,16,27,24,21,27,25,21,34,29,26,20,14,13,24,21,27,25,20,24,30,33)
dat <- data.frame(process,batch,obs,response)
dat
## process batch obs response
## 1 1 1 1 25
## 2 1 2 1 19
## 3 1 3 1 15
## 4 1 4 1 15
## 5 2 1 1 29
## 6 2 2 1 23
## 7 2 3 1 28
## 8 2 4 1 35
## 9 3 1 1 24
## 10 3 2 1 35
## 11 3 3 1 38
## 12 3 4 1 25
## 13 1 1 2 30
## 14 1 2 2 28
## 15 1 3 2 17
## 16 1 4 2 16
## 17 2 1 2 27
## 18 2 2 2 24
## 19 2 3 2 21
## 20 2 4 2 27
## 21 3 1 2 25
## 22 3 2 2 21
## 23 3 3 2 34
## 24 3 4 2 29
## 25 1 1 3 26
## 26 1 2 3 20
## 27 1 3 3 14
## 28 1 4 3 13
## 29 2 1 3 24
## 30 2 2 3 21
## 31 2 3 3 27
## 32 2 4 3 25
## 33 3 1 3 20
## 34 3 2 3 24
## 35 3 3 3 30
## 36 3 4 3 33
process <- as.fixed(process)
batch <- as.random(batch)
obs <- as.random(obs)
model <- lm(response~process+batch%in%process)
model
##
## Call:
## lm(formula = response ~ process + batch %in% process)
##
## Coefficients:
## (Intercept) process2 process3 process1:batch2
## 27.0000 -0.3333 -4.0000 -4.6667
## process2:batch2 process3:batch2 process1:batch3 process2:batch3
## -4.0000 3.6667 -11.6667 -1.3333
## process3:batch3 process1:batch4 process2:batch4 process3:batch4
## 11.0000 -12.3333 2.3333 6.0000
summary(model)
##
## Call:
## lm(formula = response ~ process + batch %in% process)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.667 -2.417 0.000 1.750 8.333
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.0000 2.2381 12.064 1.12e-11 ***
## process2 -0.3333 3.1652 -0.105 0.917004
## process3 -4.0000 3.1652 -1.264 0.218461
## process1:batch2 -4.6667 3.1652 -1.474 0.153381
## process2:batch2 -4.0000 3.1652 -1.264 0.218461
## process3:batch2 3.6667 3.1652 1.158 0.258086
## process1:batch3 -11.6667 3.1652 -3.686 0.001160 **
## process2:batch3 -1.3333 3.1652 -0.421 0.677323
## process3:batch3 11.0000 3.1652 3.475 0.001958 **
## process1:batch4 -12.3333 3.1652 -3.897 0.000684 ***
## process2:batch4 2.3333 3.1652 0.737 0.468158
## process3:batch4 6.0000 3.1652 1.896 0.070117 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.877 on 24 degrees of freedom
## Multiple R-squared: 0.7376, Adjusted R-squared: 0.6173
## F-statistic: 6.132 on 11 and 24 DF, p-value: 0.0001051
gad(model)
## Analysis of Variance Table
##
## Response: response
## Df Sum Sq Mean Sq F value Pr(>F)
## process 2 446.06 223.028 3.5365 0.073563 .
## process:batch 9 567.58 63.065 4.1965 0.002349 **
## Residual 24 360.67 15.028
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
From the anova test, we can conclude that the process is not significant (p=0.073) at an \(\alpha=0.05\) level of significance. However, this value is really close to 0.05, which may indicate some effect of process in the burning rate and further analysis might be necessary.