Experimental Design & Factorial Treatments

Experimental Design: Factorial Designs and Treatments

Introduction

  • Apologies for absence due to illness.
  • Focus on factorial designs and treatments this week.
  • Goal: Understand experimental designs, replicates, treatment structures, blocking structures, and their implementation/interpretation in R.

Treatment Designs vs. Experimental Designs

  • Treatment Designs: Selection of treatments/factors and their levels.
    • Example: Fire treatment (one factor) with levels like burnt/unburnt or unburnt/low severity/high severity.
  • Experimental Designs: How treatments are allocated to experimental units and measured.
    • Includes blocking structures and replication levels (plot, animal, etc.).
  • So far, we've primarily focused on one-factor designs (one-way ANOVA).

Factorial Treatment Designs

  • Involve more than one factor, leading to multi-way ANOVAs.
  • Efficient way to design experiments compared to multiple one-way ANOVAs.
  • Example: Two-factor design with bird feeding:
    • Factors: Diet (Diet 1, Diet 2) and Sex (Male, Female).
    • Measure food consumption.
    • Replication: Three males and three females.

Hypotheses in Factorial Designs

  • With two factors, you can address three questions:
    • Diet: Is there a difference in food consumption between diets, regardless of sex?
    • Sex: Are males or females eating more, regardless of diet?
    • Interaction: Does the effect of diet on food consumption depend on the sex of the bird?

Interaction Plots

  • Plotting two factors together can reveal interactions.
  • Example: Plotting males (blue) and females (red) for two diets.
    • If error bars diverge for one diet but not the other, it suggests a potential interaction.

Rice Example: Three Varieties and Five Nitrogen Levels

  • Experiment: Growing three rice varieties under five nitrogen levels with a randomized control block design (four blocks).
  • 15 plots per block (5 nitrogen levels x 3 rice varieties).
  • Replication: Four blocks.
  • Measure yield in tons per hectare.

Data Analysis and Interpretation

  • Plotting data with both nitrogen and variety allows for interaction analysis.
  • Parallel lines indicate no interaction.
  • Diverging lines suggest potential interactions.

Three Potential Hypotheses

  • Focus depends on research questions; may prioritize interaction or main effects.
  • Interaction: Is there an interaction between nitrogen and rice variety (i.e., does the response to nitrogen differ by variety)? Interaction term is key.
  • Nitrogen Main Effect: Regardless of variety, does adding more nitrogen increase yield? Only examined if the interaction is not significant.
  • Variety Main Effect: Regardless of nitrogen level, do some rice varieties produce better yields? Only examined if the interaction is not significant.

Model Equation

  • Model equation incorporates blocking effect, variety effect, nitrogen effect, and their interaction:
    Observed\ Data = Overall\ Mean + Blocking\ Effect + Variety\ Effect + Nitrogen\ Effect + (Variety \times Nitrogen) + Random\ Error
  • In R, the treatment structure can be written as variety + nitrogen + variety:nitrogen or as the shortcut variety * nitrogen.

Effects and Effect Sizes

  • Effects: Differences between means.
  • Effect Size: Difference between a group's mean and the overall mean.
  • Variety Effect: Mean(Variety) - Mean(Experiment)
  • Nitrogen Effect: Mean(Nitrogen) - Mean(Experiment)
  • Interaction Effect: Mean(Interaction) - Mean(Experiment)
  • Effect sizes indicate how different a variable is from zero and are useful for communicating results (e.g., to farmers).

ANOVA Table

  • Degrees of freedom:
    • Blocks: Blocks - 1
    • Varieties: Varieties - 1
    • Nitrogen: Nitrogen\ Levels - 1
    • Interaction: df(Variety) \times df(Nitrogen)
    • Residual degrees of freedom: Blocks \times (Treatment\ Combinations - 1)
  • Total treatment degrees of freedom: just simply add up our main effects and our interaction term
  • Degrees of freedom calculations are cross-checked for accuracy.

Hypothesis Testing

  • Interaction:
    • Null Hypothesis: No interaction between variety and nitrogen on yield.
    • Alternative Hypothesis: There is an interaction.
  • Main Effects (if interaction is non-significant):
    • Variety:
      • Null Hypothesis: All varieties have the same mean yield.
      • Alternative Hypothesis: At least one variety has a different mean yield.
    • Nitrogen:
      • Null Hypothesis: All nitrogen levels have the same mean yield.
      • Alternative Hypothesis: At least one nitrogen level has a different mean yield.

R Coding and ANOVA Table Interpretation

  • Use the anova function in R with the model equation.
  • Key Trick: Interpret ANOVA tables from the bottom up.
  • Start with the highest-order interaction term.
  • If the interaction is significant, do not interpret main effects in isolation.
  • If the interaction is not significant, proceed to examine main effects.
  • Post-hoc tests are used to identify differences between levels within a significant main effect.

Interaction Plots: Visualizing Interactions

  • Different scenarios:
    • No significant effects: lines overlap.
    • Main effect A significant: A1 is different from A2, lines for B are on top of each other.
    • Main effect B significant: lines separate from each other.
    • Both main effects, no interaction: lines are separated by the b variables and that slope of the line is pretty much the same between those two lines. They're kind of just tracking each other. They're in parallel with each other.
    • Significant interaction: Lines are not parallel, slopes differ, suggesting interaction.

Interaction Plots in R

  • Use eMeans package for better interaction plots.
  • interaction.plot function in base R provides an alternative.

Three-Factor (Three-Way) Designs

  • Example: Manipulating Nitrogen, Phosphorus, and Potassium (NPK) fertilizer.
  • Three main effects (one for each fertilizer).
  • Three two-way interactions (NP, NK, PK).
  • One three-way interaction (NPK).
  • Degrees of freedom are calculated similarly to two-way designs.

Maize Example

  • Factors: Fertilizer (four levels), Weed (present/absent), Maize Variety (A/B).
  • Blocking design with two blocks.
  • Replication: Two (number of blocks).
  • Model equation:
    Observed\ Data = Overall\ Mean + Block + N + P + K + (N \times P) + (N \times K) + (P \times K) + (N \times P \times K) + Error
  • R code: yield ~ block + fertilizer * weed * variety.

ANOVA Table Interpretation for Three-Factor Design

  • Start from the bottom (three-way interaction).
  • If the three, the variety of maize, whether it's infected with witchweed or not, and the different levels of fertilizer aren't interacting to influence our yield proceed to two-way interactions.
  • Significant two-way interactions: Delve into post-hoc comparisons.

Graphing Three-Way Interactions

  • Use eMeans to visualize three-way interactions.
  • If three-way interaction is not significant, assess two-way interactions through plots and post-hoc tests.