The Linear Effects model can be written as:
yijk = μ + αi + βj + αβij ϵijk
Where
αi is denoting main effect (Feed Rate)
βj is the main effect (drill Speed )
αβij is the interaction effect of feed rate and drill speed
ϵijk is the random error (assuming N(0,sigma^2))
The hypothesis test can be written as
Feed rate(Main effect):
H0 : αi = 0 ∀ i
Ha : αi≠ 0 atleast for one i
Drill speed(main effect)
H0 : βj = 0 ∀ j
Ha : βj≠ 0 atleast for one j
The interaction effect can be written as
Feedrate * drill speed Interaction effect:
H0 : αβij = 0 ∀ ij
Ha : αβij≠ 0 for at least one ij
at a reference level of α = 0.05
library(GAD)
feedrate<- rep(seq(1,4),4)
drillspeed <- c(rep(1,8),rep(2,8))
obs<- c(2.70,2.45,2.60,2.75,2.78,2.49,2.72,2.86,2.83,2.85,2.86,2.94,2.86,2.80,2.87,2.88)
mydataframe <- data.frame(feedrate,drillspeed,obs)
feedrate<- as.fixed(feedrate)
drillspeed<- as.fixed(drillspeed)
model <- aov(obs~feedrate+drillspeed+feedrate*drillspeed)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## feedrate 3 0.092500 0.030833 11.8590 0.002582 **
## drillspeed 1 0.148225 0.148225 57.0096 6.605e-05 ***
## feedrate:drillspeed 3 0.041875 0.013958 5.3686 0.025567 *
## Residual 8 0.020800 0.002600
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Making conclusions of hypothesis for the interaction effect first, we can see that it has a p-value of 0.025567 (using alpha=0.05), we are rejecting the null hypothesis. We can now properly say that the interaction between feed-rate and drill speed is significant. Because of this we would stop our testing and do not continue to testing the hypothesis of the main effects.