# Complete Block Design

Prof Randi Garcia
March 26, 2018

1. Describe the experimental design you would choose for the following situation:

A plant breeder wishes to study the effects of soil drainage and variety of tulip bulbs on flower production. Twelve 3m by 10m experimental sites are available in the test garden–each is a .5m deep trench. You can manipulate soil drainage by changing the ratio of sand to clay for the soil you put in a trench. After talking to your collaborator, you decided that four different levels of soil drainage would suffice. You'll be testing 15 different types of tulips, and measuring flower production in the spring.

### Announcements

• HW 6 is cancelled this week
• We will have a ch 7 homework due next Wed, assigned by this Wed

### Agenda

• Mid-Semester Assessment feedback
• Blocking and the Complete Block Design

### How's it going?

• “It's going well. It was a bit confusing at first. I don't really like the book, but I'm getting into the groove.”
• “It has not been going as well as I would like”
• “I really do not like the textbook because I cannot understand it. I often do not know what I am doing.”
• “I think I understand things but then I get confused when doing the hw”
• “I was very nervous when I first started the course because I am not familiar with R nor I consider data science my strength. But after I got some feedbacks back on my assessments and midterm, I think I am doing pretty ok.”

### What's going well?

• “I like the homework problems and in-class problems.”
• “Even though I don't like the book too much, the free writes are a great incentive for me to stay on track.”
• “I really like the daily reading quizzes as they provide an incentive to do the reading, and solidify my own understanding”
• “I'm really liking the group project so far, and I like the parts of class when we interact with classmates”
• “I think lectures are easy to understand and the group project helps to put everything into context.”
• “This class in general is helping me understand more about research design. It helps me understand my Multiple regression class.”
• “Apparently the exam went well for me.”
• “I like the course website very much! And I like how the schedule is presented (dates that passed are grayed out, we have links to certain things, dues are bold-faced, what part of the textbook should be read before class etc.).”

### Not so well?

• “I wish we did a little more coding.”
• “I wish we could see the notes before the class starts just so I can get a sense of where we're going. The notes could also be a bit more detailed as well.”
• “I don't really like the textbook. I think it illustrates some concepts well, but the order of the contents sometimes confuses me. It reads like a novel. You have to go back and forth to learn one concept well.”
• “Even though I know the free-writes are low stakes, I still get a bit anxious for them. I always do the readings, but sometimes there's so much information that it's hard to retain all of it.”
• “Homework questions are hard to understand and the result is that I do not do well on these assignments.”
• “It would be nice if there were solutions to exercises for personal review. I'm not really sure about where to get extra practice and would also like to check my answers.”
• “I would love the professor to post the answer key for our exam 1, because it will be easier to find the parts we got wrong in the exam.”
• “The free writes”
• “I often don't think the lectures and the textbook contents are well connected.”

### Things you can do

• “I could read better for this class.”
• “Taking better notes in class”
• “I could start assignments ahead of time rather than waiting to the last minute.”
• “Forming and going to study groups or going to TA hours.”
• “Forming and going to study groups or going to TA hours.”
• “I also need to make myself an experiment cheatsheet with all of the different experiment types and their names.”
• “go to office hours and ask peers for help if I am confused on a concept”
• “I need to ask more questions when I don't understand things…instead of hoping it will be okay. I should try to go to office hours”

### Things I will do

• More in-class problems
• Posting homework solutions in a timely manner
• Posting exam solutions!
• Be better at managing Moodle in general
• Lectures could stay in sync with the textbook readings!

### Example

Modern zoos try to reproduce natural habitats in their exhibits as much as possible. They try to use appropriate plants, but these plants can be infested with inappropriate insects. Cycads (plants that look vaguely like palms) can be infected with mealybugs, and the zoo wishes to test three treatments: 1) water, 2) horticultural oil, and 3) fungal spores in water. Nine infested cycads are taken to the testing area. Three branches are randomly selected from each tree, and 3 cm by 3 cm patches are marked on each branch. The number of mealybugs on the patch is counted. The three treatments then get randomly assigned to the three branches for each tree. After three days the mealybugs are counted again. The change in number of mealybugs is computed ($$before-after$$).

### Example - Basic Factorial Design

Modern zoos try to reproduce natural habitats in their exhibits as much as possible. They try to use appropriate plants, but these plants can be infested with inappropriate insects. Cycads (plants that look vaguely like palms) can be infected with mealybugs, and the zoo wishes to test three treatments: 1) water, 2) horticultural oil, and 3) fungal spores in water. Nine infested cycads are taken to the testing area. The number of mealybugs on each tree is counted. The three treatments then get randomly assigned to the three trees each. After three days the mealybugs are counted again. The change in number of mealybugs is computed ($$before-after$$).

### Example

Male albino laboratory rats are used routinely in many kinds of experiments. This experiment was designed to determine the requirements for protein and animo acid threonine in their food. Specifically, the experiment is interested in testing the combinations of eight levels of threonine (.2 through .9% of diet) and five levels of protein (8.68, 12, 15, 18, and 21% of diet). Baby rats were separated into five groups of 40 to form groups of approximately the same weight. The 40 rats in each group were randomly assigned to each of the 40 conditions. Body weight and food consumption were measured twice weekly, and the average daily weight gain over 21 days was recorded.

### Example - Basic Factorial Design [2]

Male albino laboratory rats are used routinely in many kinds of experiments. This experiment was designed to determine the requirements for protein and amino acid threonine in their food. Specifically, the experiment is interested in testing the combinations of eight levels of threonine (.2 through .9% of diet) and five levels of protein (8.68, 12, 15, 18, and 21% of diet). 200 baby rats were randomly assigned to each of the 40 conditions. Body weight and food consumption were measured twice weekly, and the average daily weight gain over 21 days was recorded.

### Example

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.

### Example - Basic Factorial Design

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 nine subjects, and randomly assign subjects to one of the three delivery methods. The area under the time-concentration curve is recorded for each subject after being given the drug.

### Design Principal: Blocking

• Blocking is using a factor that is not of research interest – Affects the response
• A Block is a level of a blocking factor
• We use blocking to improve precision/power

### Three Ways to Block

1. Sort units into similar groups
• Albino rats
2. Subdivide larger chunks of material into sets of smaller pieces
• Mealybug trees
3. Reuse subjects or chunks of material in each of several times slots
• Drug study

### Complete Block Design, CB[1]

• Experimental units are separated into blocks of similar units
• Then each member of a block is assigned a random treatment
• Complete means that every block x treatment combination is tested

### Inappropriate Insects

Modern zoos try to reproduce natural habitats in their exhibits as much as possible. They try to use appropriate plants, but these plants can be infested with inappropriate insects. Cycads (plants that look vaguely like palms) can be infected with mealybugs, and the zoo wishes to test three treatments: 1) water, 2) horticultural oil, and 3) fungal spores in water. Five infested cycads are taken to the testing area. Three branches are randomly selected from each tree, and 3 cm by 3 cm patches are marked on each branch. The number of mealybugs on the patch is counted. The three treatments then get randomly assigned to the three branches for each tree. After three days the mealybugs are counted again. The change in number of mealybugs is computed ($$before-after$$).

### 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

Draw the factor diagram, labeling inside outside factors.

### Formal ANOVA for CB[1]

${y}_{ijk}={\mu}+{\tau}_{i}+{\beta}_{j}+{e}_{ijk}$

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


### Informal Analysis Structure

library(tidyr)

mealybugs %>%

   tree oil spores water
1 tree1   4     -4    -9
2 tree2  29     29    18
3 tree3  14      4    10
4 tree4  14     -2     9
5 tree5   7     11    -6


### Scatterplots

library(ggplot2)

mealybugs %>%
ggplot(aes(x = spores, y = oil)) +
geom_point()


### Scatterplots

library(ggplot2)

mealybugs %>%
ggplot(aes(x = spores, y = water)) +
geom_point()


### Scatterplots

library(ggplot2)

mealybugs %>%
ggplot(aes(x = oil, y = water)) +
geom_point()


### Group Check-in Time

1. What needs to happen next for your study and when/who will do it?
2. When will you work on the project update/method section draft?
3. When will you actually start collecting data?

### 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.