Entering the data..

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.
position<-c(rep(1,9),rep(2,9))
temp<-rep(c(800,825,850),6)
res<-c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
  1. When Temperature and Position are fixed..
position<-as.fixed(position)
temp<-as.fixed(temp)
dat<-data.frame(position,temp,res)
dat
##    position temp  res
## 1         1  800  570
## 2         1  825 1063
## 3         1  850  565
## 4         1  800  565
## 5         1  825 1080
## 6         1  850  510
## 7         1  800  583
## 8         1  825 1043
## 9         1  850  590
## 10        2  800  528
## 11        2  825  988
## 12        2  850  526
## 13        2  800  547
## 14        2  825 1026
## 15        2  850  538
## 16        2  800  521
## 17        2  825 1004
## 18        2  850  532
model1<-aov(res~position+temp+position*temp,data=dat)
gad(model1)
## Analysis of Variance Table
## 
## Response: res
##               Df Sum Sq Mean Sq  F value   Pr(>F)    
## position       1   7160    7160   15.998 0.001762 ** 
## temp           2 945342  472671 1056.117 3.25e-14 ***
## position:temp  2    818     409    0.914 0.427110    
## Residual      12   5371     448                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comment: When temperature and position fixed the p- values of position 0.001762, p-value of temperature is 325e-14 and p-value of interaction of temperature and position is 0.427110.

  1. when temperature and position are random:
position<-c(rep(1,9),rep(2,9))
temp<-rep(c(800,825,850),6)
res<-c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
position<-as.random(position)
temp<-as.random(temp)
dat<-data.frame(position,temp,res)
model2<-aov(res~position+temp+position*temp,data=dat)
gad(model2)
## Analysis of Variance Table
## 
## Response: res
##               Df Sum Sq Mean Sq  F value    Pr(>F)    
## position       1   7160    7160   17.504 0.0526583 .  
## temp           2 945342  472671 1155.518 0.0008647 ***
## position:temp  2    818     409    0.914 0.4271101    
## Residual      12   5371     448                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comment: When temperature and position random the p- values of position is 0.0526583, p-value of temperature is 0.0008647 and p-value of interaction of temperature and position is 0.4271101.

  1. when temperature is random and position is fixed:
position<-c(rep(1,9),rep(2,9))
temp<-rep(c(800,825,850),6)
res<-c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
position<-as.fixed(position)
temp<-as.random(temp)
dat<-data.frame(position,temp,res)
model3<-aov(res~position+temp+position*temp,data=dat)
gad(model3)
## Analysis of Variance Table
## 
## Response: res
##               Df Sum Sq Mean Sq  F value   Pr(>F)    
## position       1   7160    7160   17.504  0.05266 .  
## temp           2 945342  472671 1056.117 3.25e-14 ***
## position:temp  2    818     409    0.914  0.42711    
## Residual      12   5371     448                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comment: When temperature is random and position is fixed the p- values of position is 0.05266, p-value of temperature is 3.25e-14 and p-value of interaction of temperature and position is 0.42711.

  1. so above 3 different scenario we saw due to fixed and random alteration the p- value of interaction between temperature and position is same (0.42711). but when fixed and random effects the main effects p-value changes. for both fixed effect the temp and position are significant. for both random temp is significant but position is near to significant and for position fixed and temp random the p-value of temp is significant but p-value of position is not significant. all for all cases the p- value of interaction is not significant.

temperature position temp:position

both fixed 3.25e-14 0.001762 0.42711

both random 0.000864 0.05265 0.42711

R/F 3.25e-14 0.05266 0.42711