Topics / Chapter 9
Testing two factors together
To study two factors such as variety and fertilizer in the same trial and see whether the effect of one depends on the other.
Asking two questions in one trial
You want to know which of three wheat varieties yields most and how much nitrogen to apply. You could run two separate trials, one for varieties and one for nitrogen rates. But that way you can never ask the really important question:
Does every variety respond to nitrogen in the same way?
Perhaps one variety doubles its yield with 12 kg of nitrogen while another stops responding after 6 kg. The only way to see this is to test every variety × rate combination together in the same trial. This is a factorial experiment. 3 varieties × 3 rates make 9 combinations; in a randomized complete block design, each combination appears once in every block.
A factorial experiment has two advantages:
- It reveals interaction: whether the effect of one factor changes with the level of the other.
- It is more economical. Every plot gives information about both factors at once. In the variety comparison, each variety’s mean comes from all the plots of all three rates.
What is an interaction?
Three effects are tested in the ANOVA table:
| Effect | Question it asks |
|---|---|
| Variety (A) | Averaged over all rates, do the varieties differ? |
| Nitrogen (B) | Averaged over all varieties, do the rates differ? |
| Variety × Nitrogen (A×B) | Does the effect of nitrogen depend on the variety? |
An interaction means the two factors don’t act independently. It is easiest to see in the interaction plot, where one line is drawn for each variety: if the lines are parallel there is no interaction, meaning nitrogen affects every variety by the same amount. If the lines diverge, converge or cross, there is an interaction.
If the interaction is significant, the interpretation changes. Saying “the best rate on average is 12 kg” becomes misleading, because 12 kg may be best for one variety while giving the same result as 6 kg for another. Comparisons are then made separately for each variety.
In what order should the results be read?
- Look at the interaction first. If A×B is significant, don’t interpret the main effects on their own; compare within each row (each level of A) of the two-way table.
- If the interaction is not significant, move to the main effects. Compare the marginal means of the significant factor. These means hold across all levels of the other factor.
- Translate the result to the field. For example: “Variety B with 12 kg of nitrogen gave the highest yield; in Variety C, more than 6 kg did not increase yield.”
Three wheat varieties received three nitrogen rates (0, 6, 12 kg/da); each combination was tested in 3 blocks (randomized complete blocks). Yield (kg/da) was measured. Do the varieties respond to nitrogen in the same way?
| Variety | Nitrogen | Block 1 | Block 2 | Block 3 |
|---|---|---|---|---|
| Variety A | 0 kg | |||
| 6 kg | ||||
| 12 kg | ||||
| Variety B | 0 kg | |||
| 6 kg | ||||
| 12 kg | ||||
| Variety C | 0 kg | |||
| 6 kg | ||||
| 12 kg |
- VarietysignificantF = 148.2, p < 0.0001
- NitrogensignificantF = 267.14, p < 0.0001
- Variety × NitrogensignificantF = 21.96, p < 0.0001
| Source of variation | df | SS | MS | F |
|---|---|---|---|---|
| Block | 2 | 3612.96 | 1806.48 | 35.79 ** |
| Variety | 2 | 14963.19 | 7481.59 | 148.2 ** |
| Nitrogen | 2 | 26971.63 | 13485.81 | 267.14 ** |
| Variety × Nitrogen | 4 | 4434.81 | 1108.7 | 21.96 ** |
| Error | 16 | 807.7 | 50.48 | |
| Total | 26 | 50790.3 |
* significant at 5%, ** at 1%, ns: not significant. CV = 1.61%.
What does the interaction say?
The interaction is significant: the effect of Nitrogen depends on the Variety. So “the best Nitrogen” has no single answer; comparisons should be made separately for each Variety. The best Nitrogen level is the same for every Variety (12 kg), but the size of the response differs: the range across levels is 115.7 for Variety B and only 41.7 for Variety C.
| Variety \ Nitrogen | 0 kg | 6 kg | 12 kg | Variety mean |
|---|---|---|---|---|
| Variety A | 397c | 439.67b | 470a | 435.56 |
| Variety B | 414.33c | 473.67b | 530a | 472.67 |
| Variety C | 389b | 428a | 430.67a | 415.89 |
| Nitrogen mean | 400.11 | 447.11 | 476.89 | 441.37 |
Because the interaction is significant, the main-effect means (margins) should not be interpreted on their own; the letters in each row compare the Nitrogen levels at that level of Variety. Duncan (5%) critical ranges: R2 = 12.3, R3 = 12.9.
How were the sums of squares calculated?
Correction factor: the square of the grand total divided by the number of plots.
Total sum of squares:
Block sum of squares: each block total squared, divided by the plots per block (a·b).
Variety sum of squares: each Variety level total comes from 9 plots.
Nitrogen sum of squares: each Nitrogen level total comes from 9 plots.
Interaction: from the variability between combinations (A×B cells), subtract what each factor explains on its own. What remains is how the factors affect each other.
Error: subtract the parts explained by blocks and combinations from the total.
Error degrees of freedom (a·b − 1)(r − 1) = 16. All three F values use the same error:
Each F value is compared with the F table value for its degrees of freedom; significance levels are marked with stars.
Comparison details: Duncan’s multiple range test
Means are ranked; a larger critical difference is used for means far apart in rank and a smaller one for neighbours. Widely used in agricultural field trials.
Rank the means from largest to smallest. The critical range depends on how many means (p) the pair spans.
Critical ranges:
If a wider range is not significant, the differences between means inside it are also declared not significant.
Means whose difference is below the critical value share a letter. 3 of 3 pairs differ significantly.
In the example all three effects are significant at the 1% level. In the interaction plot Variety B’s line is the steepest, while Variety C’s line levels off after 6 kg. Looking at the letters in the two-way table, you’ll see 6 and 12 kg share a letter for Variety C. Giving that variety 12 kg of nitrogen is money wasted.
Degrees of freedom
In a factorial experiment with levels of A, levels of B and blocks:
| Source | df |
|---|---|
| Block | |
| A | |
| B | |
| A × B | |
| Error | |
| Total |
The degrees of freedom of A, B and A×B add up to the treatment degrees of freedom () the combinations would have in a single-factor trial. The factorial analysis splits the treatment sum of squares into these three meaningful parts.
Split plots: when one factor needs large plots
Some practices can’t be applied to small plots. Irrigation, tillage method or sowing date are usually applied to large areas; switching a drip line on and off for a 2 m plot is not practical. To test such a factor together with variety, the split-plot design is used:
- Each block is divided into as many large main plots as the first factor has levels. The first factor (irrigation) is randomized to the main plots.
- Each main plot is divided into as many subplots as the second factor has levels. The second factor (variety) is randomized within each main plot.
This has an important consequence for the analysis: two separate error terms are needed.
- Error (a), the main-plot error. Irrigation levels are compared between large plots far apart from each other, where soil differences are large. And each block has only one main plot per irrigation level. So irrigation is tested against a large error with few degrees of freedom and is measured less precisely.
- Error (b), the subplot error. Varieties are compared on small, neighbouring plots within the same main plot, a much more precise comparison. Variety and the irrigation × variety interaction are tested against this small error.
Irrigation (main plot: dry, irrigated) and three chickpea varieties (subplot) were tested in 4 blocks. Irrigation can only be applied to large plots, so it is the main plot factor; each main plot was split into three subplots and the varieties were randomized among them. Yield (kg/da) was measured.
In a split-plot design factor 1 is the main plot (applied to large plots) and factor 2 is the subplot.
| Irrigation | Variety | Block 1 | Block 2 | Block 3 | Block 4 |
|---|---|---|---|---|---|
| Dry | Variety 1 | ||||
| Variety 2 | |||||
| Variety 3 | |||||
| Irrigated | Variety 1 | ||||
| Variety 2 | |||||
| Variety 3 |
- IrrigationsignificantF = 63.71, p = 0.0041
- VarietysignificantF = 110.56, p < 0.0001
- Irrigation × VarietysignificantF = 5.8, p = 0.0173
| Source of variation | df | SS | MS | F |
|---|---|---|---|---|
| Block | 3 | 6796.13 | 2265.38 | 1.51 ns |
| Irrigation | 1 | 95887.04 | 95887.04 | 63.71 ** |
| Error (a) | 3 | 4515.13 | 1505.04 | |
| Variety | 2 | 21558.33 | 10779.17 | 110.56 ** |
| Irrigation × Variety | 2 | 1130.33 | 565.17 | 5.8 * |
| Error (b) | 12 | 1170 | 97.5 | |
| Total | 23 | 131056.96 |
* significant at 5%, ** at 1%, ns: not significant. CV (a) = 10.23%, CV (b) = 2.6%. Irrigation and blocks were tested against Error (a); Variety and the interaction against Error (b).
What does the interaction say?
The interaction is significant: the effect of Variety depends on the Irrigation. So “the best Variety” has no single answer; comparisons should be made separately for each Irrigation. The best Variety level is the same for every Irrigation (Variety 2), but the size of the response differs: the range across levels is 87.8 for Irrigated and only 57.3 for Dry.
| Irrigation \ Variety | Variety 1 | Variety 2 | Variety 3 | Irrigation mean |
|---|---|---|---|---|
| Dry | 313.5b | 346a | 288.75c | 316.08 |
| Irrigated | 431.75b | 491.75a | 404c | 442.5 |
| Variety mean | 372.63 | 418.88 | 346.38 | 379.29 |
Because the interaction is significant, the main-effect means (margins) should not be interpreted on their own; the letters in each row compare the Variety levels at that level of Irrigation. Duncan (5%) critical ranges: R2 = 15.21, R3 = 15.92.
Why two separate errors?
Irrigation is applied to large main plots, so each block has only one main plot per Irrigation level. Soil differences between main plots get mixed into the Irrigation comparison, so Irrigation is tested against the main-plot error (MS = 1505.04), which is much larger than the subplot error.
Had the data been wrongly analysed as a plain factorial, Irrigation would get F = 252.99 (p < 0.0001); the correct analysis gives F = 63.71. The wrong analysis makes the effect of Irrigation look far more certain than it is.
How were the sums of squares calculated?
Correction factor: the square of the grand total divided by the number of plots.
Total sum of squares:
Block sum of squares: each block total squared, divided by the plots per block (a·b).
Irrigation sum of squares: each Irrigation level total comes from 12 plots.
Variety sum of squares: each Variety level total comes from 8 plots.
Interaction: from the variability between combinations (A×B cells), subtract what each factor explains on its own. What remains is how the factors affect each other.
Main plot error: in each block every Irrigation level is one main plot. Subtract the block and Irrigation parts from the variability of main plot totals.
Subplot error: the remaining variability.
Degrees of freedom: Error (a) = (r − 1)(a − 1) = 3, Error (b) = a(r − 1)(b − 1) = 12.
Irrigation is compared between main plots, so it is divided by the main plot error:
Variety and the interaction are compared within the same main plot, so they are divided by the subplot error:
Each F value is compared with the F table value for its degrees of freedom; significance levels are marked with stars.
Comparison details: Duncan’s multiple range test
Means are ranked; a larger critical difference is used for means far apart in rank and a smaller one for neighbours. Widely used in agricultural field trials.
Rank the means from largest to smallest. The critical range depends on how many means (p) the pair spans.
Critical ranges:
If a wider range is not significant, the differences between means inside it are also declared not significant.
Means whose difference is below the critical value share a letter. 3 of 3 pairs differ significantly.
In a split-plot design, Variety comparisons within the same Irrigation level use Error (b). Comparing Irrigation levels within the same Variety level requires combining the two errors; this calculator does not do that.
With “Split plot” selected, the calculator also shows what the same data would give if analysed as a plain factorial. When the main-plot error is mixed with the subplot error, the F value for irrigation becomes about four times larger, and the irrigation effect looks far more certain than it is.
Which factor goes on the main plots?
- The factor whose application needs large areas goes on the main plots: irrigation, tillage, sowing date.
- The factor whose precise comparison matters more goes on the subplots. The main-plot factor is always measured more coarsely.
- The interaction is tested against the subplot error, so it is measured precisely. Split plots are a good design for studying interactions too.
Specify the design correctly in the analysis: the same numbers give different results when analysed as a factorial or as a split plot. Which analysis is right is decided not by the data but by how the trial was laid out in the field. If randomization was done on main plots, the analysis must be a split-plot analysis.