After the workshop
Use this deck on your own, with your group’s allocation table beside you.
| 1. Recall |
Answer before looking at the explanations |
5 minutes |
| 2. Review |
Check the design and interpret an interaction |
10 minutes |
| 3. Prepare |
Describe a response for next class’s simulation |
8 minutes |
Pause at each question. Write an answer, then advance to check it.
Review
Activity 2 · Explain the design
The LEGO model
- Azure plates represent rooms.
- Yellow plates represent pens.
- Pink bricks represent pigs.
- Green/red tiles mark standard/high-fibre diet.
- Blue marker absent/present marks standard/enriched housing.
The allocation table
One possible room in the completed factorial design:
| P01 |
1 |
1 |
High fibre |
Enriched |
| P02 |
1 |
2 |
Standard |
Standard |
| P03 |
1 |
3 |
High fibre |
Standard |
| P04 |
1 |
4 |
Standard |
Enriched |
- Keep one allocation row per pen, with a unique pen identifier.
- Check that each of the other rooms also contains all four combinations.
- Preserve the method used to generate the allocation.
Why rooms matter
- Rooms may differ in conditions that influence growth.
- Comparing treatments within rooms helps separate treatment differences from room differences.
- Blocking is most useful when units within a block are relatively similar.
Design structure
| Factorial treatment structure |
Which factor levels occur together |
Both diets under both housing conditions |
| Blocking |
Which units form groups for treatment comparisons |
Four pens in each room |
| Randomisation |
How treatments reach particular units |
Shuffle all four combinations separately within each room |
The two structural decisions are compatible: a factorial experiment can use a randomised complete block design.
An interaction?
Hypothetical mean daily gain, in grams per day:
| Standard |
750 |
730 |
| Enriched |
760 |
810 |
- Calculate high-fibre minus standard diet within each housing condition.
- Does one diet difference adequately describe both conditions?
- Explain the biological meaning in one sentence.
Interaction: answer
- Standard housing: −20 g/day.
- Enriched housing: +50 g/day.
- The diet effect depends on housing: an interaction.
- The equally weighted average diet effect is +15 g/day, which hides this difference.
More factors
With 16 independent pens and two levels per treatment factor:
These counts assume equal allocation and set aside the four-room complete-block restriction.
With four factors, each combination occurs once. Six pigs per pen still give only one independent allocation per combination.
Targeted reading
In Ruxton and Colegrave, Experimental Design for the Life Sciences, fourth edition:
- Chapter 8, §§8.1–8.3: revisit treatment combinations and interactions. Explain why testing both diets under both housing conditions is useful.
- Chapter 9, §§9.1–9.2: revisit blocking. Explain why each room contains every treatment combination.
Write two short paragraphs using your group’s experiment. Revisit Chapter 5 if the distinction between pigs and pen replicates remains unclear.
Prepare
Activity 3 · Ready for Class 5
Next class’s study
We will use a simpler experiment to concentrate on simulating responses.
| Experimental units |
16 pens |
16 pens |
| Blocks |
Four rooms |
Four rooms |
| Treatment factors |
Diet and housing |
Diet only |
| Allocation within room |
One of each combination |
Two pens per diet |
| Response |
Planned measurements |
One simulated response per pen |
Housing will not vary as an experimental treatment in the Class 5 exercise.
A response per pen
Possible responses include:
- Mean daily weight gain.
- Whether any pig needed veterinary treatment.
- Number of treatment events.
- Feed conversion ratio.
The response definition determines what values one observation can take.
Possible values
For each response, describe its possible values. Do this before choosing a statistical distribution.
| Mean daily gain |
Could it include decimals? Could it be negative? |
| Any pig treated |
Which two values encode no and yes? |
| Treatment events |
Could it be zero? Could it be 2.5? |
| Feed conversion ratio |
With positive feed intake and positive gain, could it be negative? |
Pause and write your answers before continuing.
Values: answers
| Mean daily gain |
Continuous values, including negative values if pigs lose weight |
| Any pig treated |
0 or 1 for each pen |
| Treatment events |
Whole numbers: 0, 1, 2, and so on |
| Feed conversion ratio |
Positive continuous values under our stated conditions |
A probability of 0.2 can describe the chance that a pen needs treatment. The observed yes/no outcome is still 0 or 1.
Design before data
Illustrative rows for the new diet-only study:
| P01 |
1 |
1 |
High fibre |
Not yet generated |
| P02 |
1 |
2 |
Control |
Not yet generated |
| P03 |
1 |
3 |
Control |
Not yet generated |
| P04 |
1 |
4 |
High fibre |
Not yet generated |
- The allocation table can exist before any outcome is measured.
- A simulation supplies an outcome under stated assumptions.
- A fresh simulated dataset can use the same allocation table.
Assumed means
Suppose we assume these expected mean daily gains:
| 1 |
750 g/day |
770 g/day |
| 2 |
780 g/day |
800 g/day |
- The assumed diet difference is 20 g/day in both rooms.
- The assumed room difference is 30 g/day for both diets.
- Individual pen outcomes can vary around these means.
These numbers describe a hypothetical scenario, not results from the workshop.
What changes?
Suppose we retain the same allocation and the same assumed means, but generate another set of pen outcomes.
- Must the observed diet difference be exactly 20 g/day?
- Does a different set of outcomes mean that the treatment allocation changed?
- What additional information do we need beyond the expected means to simulate realistic observations?
Pause and explain each answer in words. No calculation or R code is needed.
Simulation: answers
- A simulated treatment estimate can differ from the assumed 20 g/day because outcomes vary among pens.
- The allocation can remain fixed while the simulated responses change.
- We need assumptions about the response distribution and variation, as well as expected means.
Next class, we will distinguish randomising treatment allocation from generating responses, and record the random seeds used for each operation.
Ready for Class 5
Bring your allocation table and a short response to these prompts:
- Which pen-level outcome would you like to investigate, and over what period?
- What values could one observation take?
- What diet difference would matter biologically?
- What evidence could inform your assumptions about room differences and variation among pens?
You may write “I need more information” where appropriate. State what information you would seek.
Sources
Ruxton, G. D., and Colegrave, N. (2016). Experimental Design for the Life Sciences. Fourth edition. Oxford University Press. Book and contents.
- Units and replication: Chapters 4–5.
- Randomisation: Chapter 7.
- Factorial designs and interactions: Chapter 8.
- Blocking: Chapter 9.
The simulation preparation follows the course’s Class 5 teaching plan. All numerical cases are hypothetical. Illustrations are reused course artwork.