A full factorial experiment was conducted to determine whether either firing temperature or furnace position affects the baked density of a carbon anode.
We start by collecting the data required to solve the question which is provided to us in the form of a table
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.
obs<- c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
temp<- c(800,825,850)
pos<-c(rep(1,9),rep(2,9))
temp<-c(rep(temp,6))
For this both temp and position are fixed.
pos <- as.fixed(pos)
temp <- as.fixed(temp)
model <- aov(obs~pos+temp+pos*temp)
GAD::gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## pos 1 7160 7160 15.998 0.001762 **
## temp 2 945342 472671 1056.117 3.25e-14 ***
## pos:temp 2 818 409 0.914 0.427110
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Therefore the p-value for the interaction of temperature and position for fixed are position= 0.0017, temp=3.25e-14.
And the interaction shows p-value of 0.427
For this both temp and position are random.
pos<- as.random(pos)
temp<-as.random(temp)
model<-aov(obs~pos+temp+pos*temp)
GAD::gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## pos 1 7160 7160 17.504 0.0526583 .
## temp 2 945342 472671 1155.518 0.0008647 ***
## pos:temp 2 818 409 0.914 0.4271101
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Therefore the p-value for the interaction of temperature and position for random are position=0.0526, temp=0.0008.
And the interaction shows p-value of 0.427
For this temp is fixed and position is random.
pos<- as.fixed(pos)
temp<-as.random(temp)
model<-aov(obs~pos+temp+pos*temp)
GAD::gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## pos 1 7160 7160 17.504 0.05266 .
## temp 2 945342 472671 1056.117 3.25e-14 ***
## pos:temp 2 818 409 0.914 0.42711
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Therefore the p-value for the interaction of temperature and position for random are position=0.0526, temp=0.0008.
And the interaction shows p-value of 0.427
The interaction p values seem the same but as there is a change in the effects i.e. fixed and random there is change in the p-values significantly.