Two-Way Basic Factorial Design

Prof Randi Garcia
March 7, 2018

Reading Free-Write (5 minutes)

  1. Sketch an interaction graph based on the set means (average daily weight gain) shown above. These factors are from the piglets example from your reading.
  2. Give an interpretation for this interaction.

Announcements

  • Project meeting this week
    • Next project piece due on April 2nd
  • Exam 1 due today at 5pm
    • Snow due date: Thurs at noon

Agenda

  • ANOVA for the BF[1] Design in R
  • The BF[2] design

Parks and Recreation

Deputy director of the Pawnee Parks and Rec department, Leslie Knope, needs to know how resistant different vegetative types are to trampling so that the number of visitors can be controlled in sensitive areas. Twenty lanes of a park are established, each .5 m wide and 1.5 m long. These twenty lanes are randomly assigned to five treatments: 0, 25, 75, 200, or 500 walking passes. Each pass consists of a 70-kg individual wearing boots, walking in a natural gait. One year after trampling, the average height of the vegetation along the lanes are measured.

  • Analysis in R

Piglets

It seems natural to think that adding the right vitamins to a pig's diet might produce fatter pigs faster. You've decided to study the effects of B12 in two doses (0mg and 5mg). But pigs have bacteria living in their intestines that might prevent the uptake of vitamins, so you decided to give antibiotics to the pigs in one of two doses (0mg or 40 mg). You design your experiment in such a way that 3 piglets are randomly assigned to each of the 4 treatment conditions. You measure their weight every day, and take each pig's average daily weight gain as your final number recorded.

Principal of Factorial Crossing

Two sets of treatments are crossed if all possble combinations of treatments occur in the design. The design in called a two-way factorial if there are two factors that are crossed, and it is then said to have a factorial treatment structure.

Paper Helicopters

Paper helicopters can be cut from one half of an 8.5 by 11 sheet of paper. We can conduct an experiment by dropping helicopters from a fixed height and clocking the time it takes to drop. We can vary wing length: 4.25 in, 4.0 in, 3.75 in, and 3.5 in, as well as body width: 3.25 in, 3.75 in, 4.0 in, and 4.25 in. We'll make 32 planes and randomly assign them to the 16 combinations.

Swimsuit/Sweater Study

Objectification theory (Fredrickson & Roberts, 1997) posits that American culture socializes women to adopt observers' perspectives on their physical selves. This self-objectification is hypothesized to (a) produce body shame, which in turn leads to restrained eating, and (b) consume attentional resources, which is manifested in diminished mental performance. An experiment manipulated self-objectification by having participants try on a swimsuit or a sweater. Further, it tested 21 women and 20 men, in each condition, and found that these effects on body shame and restrained eating replicated for women only. Additionally, self-objectification diminished math performance for women only.

Research Questions in a BF[2] Design

  1. Does treatment A have an effect on the response variable?
    • Is there a main effect of factor 1?
  2. Does treatment A have an effect on the response variable?
    • Is there a main effect of factor 2?
  3. Does being in a specific combination of treatments have an effect over and above the additive effects of treatment A and B alone?
    • Is there an interaction between factor 1 and factor two?

Interaction Mantra

An interaction is present if the effect of one factor is different across levels of the other factor.

plot of chunk unnamed-chunk-1

Interaction Graphs

For each of the following interaction graphs, answer the following questions with YES or NO.

  1. Is there a main effect of B12?
  2. Is there a main effect of antibiotics?
  3. Is there an interaction between B12 and antibiotics?

Practice 1

plot of chunk unnamed-chunk-2

Practice 1

plot of chunk unnamed-chunk-3

  1. YES
  2. YES
  3. YES

Practice 2

plot of chunk unnamed-chunk-4

Practice 2

plot of chunk unnamed-chunk-5

  1. NO
  2. NO
  3. YES

Practice 3

plot of chunk unnamed-chunk-6

Practice 3

plot of chunk unnamed-chunk-7

  1. YES
  2. YES
  3. NO

Practice 4

plot of chunk unnamed-chunk-8

Practice 4

plot of chunk unnamed-chunk-9

  1. NO
  2. YES
  3. NO

Inside-outside Factors

  • Draw the factor diagram vertically and label all inside and outside factors with arrows. Include the universal factors (benchmark and residuals).

Mathematical notation

\[ {y}_{ijk}={\mu}+{\alpha}_{i}+{\beta}_{j}+{\alpha\beta}_{ij}+{e}_{ijk} \]

  • Where \( i \), from 1 to \( a \), is the level of the first factor,
  • \( j \), from 1 to \( b \), is the level of the second factor,
  • and \( k \), from 1 to \( n \), is the observation in each cell.

Sum of Squares (SS)

\[ {SS}_{A} = \sum_{i=1}^{a}bn(\bar{y}_{i..}-\bar{y}_{…})^{2} \]

\[ {SS}_{B} = \sum_{j=1}^{b}an(\bar{y}_{.j.}-\bar{y}_{…})^{2} \]

\[ {SS}_{AB} = n\sum_{i=1}^{a}\sum_{j=1}^{b}(\bar{y}_{ij.}-\bar{y}_{i..}-\bar{y}_{.j.}+\bar{y}_{…})^{2} \]

\[ {SS}_{E} = \sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{n}({y}_{ijk}-\bar{y}_{ij.})^{2} \]

Degrees of Freedom (df)

\[ {df}_{A}=a-1 \]

\[ {df}_{B}=b-1 \]

\[ {df}_{AB}=(a-1)(b-1) \]

\[ {df}_{E}=ab(n-1) \]

Mean Squares (MS)

\[ {MS}_{A}=\frac{{SS}_{A}}{{df}_{A}} \]

\[ {MS}_{B}=\frac{{SS}_{B}}{{df}_{B}} \]

\[ {MS}_{AB}=\frac{{SS}_{AB}}{{df}_{AB}} \]

\[ {MS}_{E}=\frac{{SS}_{E}}{{df}_{E}} \]

F-ratios and the F-distribution

The ultimate statistics we want to calculate is Variability in treatment effects/Variability in residuals. The F-ratio.

\[ F = \frac{{MS}_{A}}{{MS}_{E}} \]

\[ F = \frac{{MS}_{B}}{{MS}_{E}} \]

\[ F = \frac{{MS}_{AB}}{{MS}_{E}} \]

ANOVA Source Table for BF[2]

\[ {y}_{ijk}={\mu}+{\alpha}_{i}+{\beta}_{j}+{\alpha\beta}_{ij}+{e}_{ijk} \]

Source SS df MS F
Treatment A \( \sum_{i=1}^{a}bn(\bar{y}_{i..}-\bar{y}_{…})^{2} \) \( a-1 \) \( \frac{{SS}_{A}}{{df}_{A}} \) \( \frac{{MS}_{A}}{{MS}_{E}} \)
Treatment B \( \sum_{j=1}^{b}an(\bar{y}_{.j.}-\bar{y}_{…})^{2} \) \( b-1 \) \( \frac{{SS}_{B}}{{df}_{B}} \) \( \frac{{MS}_{B}}{{MS}_{E}} \)
Interaction AB \( n\sum_{i=1}^{a}\sum_{j=1}^{b}(\bar{y}_{ij.}-\bar{y}_{i..}-\bar{y}_{.j.}+\bar{y}_{…})^{2} \) \( (a-1)(b-1) \) \( \frac{{SS}_{AB}}{{df}_{AB}} \) \( \frac{{MS}_{AB}}{{MS}_{E}} \)
Error \( \sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{n}({y}_{ijk}-\bar{y}_{ij.})^{2} \) \( ab(n-1) \) \( \frac{{SS}_{E}}{{df}_{E}} \)

BF[2] in R