11 Hypothesis Testing
11.1 The Two-Way ANOVA Table with Main Effects Only
<- clean_twoway_data %>%
two_aov aov(formula = Yield ~ Fertilizer + Manure, data = .)
%>%
two_aov summary
## Df Sum Sq Mean Sq F value Pr(>F)
## Fertilizer 1 17.67 17.672 6.332 0.0222 *
## Manure 1 19.21 19.208 6.883 0.0178 *
## Residuals 17 47.44 2.791
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Similar to the One-Way ANOVA table,
Df
– degress of freedomSum Sq
– sum of squaresMean Sq
– mean sum of squaresF value
– value of \(F\) statisticPr(>F)
– \(p\)-value
Thus, from the table
\[\begin{align} SSR &= 17.67 & MSR &= 17.672 & F_C = 6.332\\ SSC &= 19.21 & MSC &= 19.208 & F_R = 6.883\\ SSE &= 47.44 & MSE &= 2.791 & \\ \end{align}\]
Similar to when you look up at an F-table, the p-values can be computed using the following R code.
pf(q = 6.332, df1 = 1, df2 = 17, lower.tail = F)
## [1] 0.02219209
pf(q = 6.883, df1 = 1, df2 = 17, lower.tail = F)
## [1] 0.01779112
11.2 The Two-Way ANOVA Table with Interactions
<- clean_twoway_data %>%
two_aov2 aov(formula = Yield ~ Fertilizer*Manure, data = .)
%>%
two_aov2 summary
## Df Sum Sq Mean Sq F value Pr(>F)
## Fertilizer 1 17.67 17.672 6.368 0.0226 *
## Manure 1 19.21 19.208 6.922 0.0182 *
## Fertilizer:Manure 1 3.04 3.042 1.096 0.3107
## Residuals 16 44.40 2.775
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The interaction is not significant so we proceed on using the additive model (i.e., main-effects only).