Split Plot/Repeated Measures Design

Prof Randi Garcia
January 28, 2021

Reading contemplation question

  1. Sketch what the data in Figure 7.7 (on pg. 254) might look like in a data frame that is ready for analysis?

Announcements

  • Quiz 1 due tonight 11:55p
    • Please upload PDF
  • HW6 due on Tues 2/02 9:20a
  • HW7 due on Thurs 2/04 11:55p
  • MP2
    • Groups posted here
    • Pre-approval submissions due Fri 2/05 at 9:20a

Syllabus update

I am now dropping the lowest TWO homework scores

  • polleverywhere question about content requests!

Agenda

  • ANOVA for CB[1]
  • Latin square designs
  • Split plot designs

Inappropriate Insects

treatment tree1 tree2 tree3 tree4 tree5
oil 4 29 14 14 7
spores -4 29 4 -2 11
water -9 18 10 9 -6

Formal ANOVA for CB[1]

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

Source SS df MS F
Treatment \( \sum_{i=1}^{a}b(\bar{y}_{i.}-\bar{y}_{..})^{2} \) \( a-1 \) \( \frac{{SS}_{T}}{{df}_{T}} \) \( \frac{{MS}_{T}}{{MS}_{E}} \)
Blocks \( \sum_{j=1}^{b}a(\bar{y}_{.j}-\bar{y}_{..})^{2} \) \( b-1 \) \( \frac{{SS}_{B}}{{df}_{B}} \) \( \frac{{MS}_{B}}{{MS}_{E}} \)
Error \( \sum_{i=1}^{a}\sum_{j=1}^{b}({y}_{ij}-\bar{y}_{i.}-\bar{y}_{.j}+\bar{y}_{..})^{2} \) \( (a-1)(b-1) \) \( \frac{{SS}_{E}}{{df}_{E}} \)

Data Analysis Structure

mealybugs
    tree treatment bugs_change
1  tree1     water          -9
2  tree1    spores          -4
3  tree1       oil           4
4  tree2     water          18
5  tree2    spores          29
6  tree2       oil          29
7  tree3     water          10
8  tree3    spores           4
9  tree3       oil          14
10 tree4     water           9
11 tree4    spores          -2
12 tree4       oil          14
13 tree5     water          -6
14 tree5    spores          11
15 tree5       oil           7

Formal ANOVA

mod <- lm(bugs_change ~ treatment + tree, data = mealybugs)

anova(mod)
Analysis of Variance Table

Response: bugs_change
          Df  Sum Sq Mean Sq F value   Pr(>F)   
treatment  2  218.13  109.07  2.9963 0.106846   
tree       4 1316.40  329.10  9.0412 0.004603 **
Residuals  8  291.20   36.40                    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Bioequivalence of drug delivery

This experiment is interested in the blood concentration of a drug after it has been administered. The concentration will start at zero, then go up, and back down as it is metabolized. This curve may differ depending on the form of the drug (a solution, a tablet, or a capsule). We will use three subjects, and each subject will be given the drug three times, once for each method. The area under the time-concentration curve is recorded for each subject after each method of drug delivery.

Latin Square Design

In the bioequivalence example, because the body may adapt to the drug in some way, each drug will be used once in the first period, once in the second period, and once in the third period.

  • We can use a Latin Square design to control the order of drug administration
  • In this way, time is a second blocking factor (subject is the first)

Latin Square Design

Treatments:

  • Solution is treatment A
  • Tablet is treatment B
  • Capsule is treatment C
period 1 period 2 period 3
subject 1 A 1799 C 2075 B 1396
subject 2 C 1846 B 1156 A 868
subject 3 B 2147 A 1777 C 2291

Factor diagram for the Latin Square??

Latin Square Design

The actual data structure for analysis is “long” format

subject treatment period group c_curve
1 solution 1 A 1799
1 capsule 2 C 1846
1 tablet 3 B 2147
2 capsule 1 C 2075
2 tablet 2 B 1156
2 solution 3 A 1777
3 tablet 1 B 1396
3 solution 2 A 868
3 capsule 3 C 2291

Informal ANOVA for Latin Square

We can make a parallel dot graph

Error in ggplot(bioequivalence, aes(x = treatment, y = c_curve)) : 
  could not find function "ggplot"