library(GAD)
obs <- c(570,1063,565,
565,1080,510,
583,1043,590,
528,988,526,
547,1026,538,
521,1004,532)
position <- c(rep(1,9),rep(2,9))
temperature <- rep(c(800,825,850),6)
position <- as.fixed(position)
temperature <- as.fixed(temperature)
model <- aov(obs~position*temperature)
summary(model)
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 15.998 0.00176 **
## temperature 2 945342 472671 1056.117 3.25e-14 ***
## position:temperature 2 818 409 0.914 0.42711
## Residuals 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-values for position, temperature and interaction between position and temperature are respectively: 0.00176,3.25e-14, and 0.427
position <- as.random(position)
temperature <- as.random(temperature)
model <- aov(obs~position*temperature)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 17.504 0.0526583 .
## temperature 2 945342 472671 1155.518 0.0008647 ***
## position:temperature 2 818 409 0.914 0.4271101
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-values for position, temperature and interaction between position and temperature are respectively: 0.053,0.00086, and 0.42
position <- as.fixed(position)
temperature <- as.random(temperature)
model <- aov(obs~position*temperature)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 17.504 0.05266 .
## temperature 2 945342 472671 1056.117 3.25e-14 ***
## position:temperature 2 818 409 0.914 0.42711
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-values for position, temperature and interaction between position and temperature are respectively: 0.053,3.25e-14, and 0.427.
There is no interaction in any of the cases. However, the main effects for temperature seems to be significant for all the cases. Position was significant only when both factors were considered as fixed, whereas in both random and mixed groups, position was not significant.