Skip to main content

Unit 5

Introduction

Welcome to Week 5 of BIO144!

Learning objectives for the week

These learning objectives, together with the content of the course book chapter, define what you need to know for the exam.

After this unit, students will be able to:

  1. Explain one-way ANOVA as a linear model with a single categorical explanatory variable.
  2. Explain how the total variation is partitioned into between-group and within-group components, and how the F statistic is calculated from them.
  3. Calculate the total, model and residual degrees of freedom of a one-way ANOVA (n − 1, k − 1 and n − k), and explain why they add up.
  4. Explain why sums of squares are divided by their degrees of freedom to give mean squares, and identify the two degrees of freedom of the F-distribution.
  5. Calculate missing entries in an ANOVA table (degrees of freedom, sums of squares, mean squares, F).
  6. Use R to fit a one-way ANOVA with lm() and obtain the ANOVA table.
  7. Use R to test whether the group means differ, and draw the appropriate conclusion.
  8. Interpret the coefficients of a model with a categorical explanatory variable: the reference level and the differences from it.
  9. Use R to obtain group means and the estimated differences between groups, with their uncertainty.
  10. Use diagnostic plots to judge whether the assumptions of a one-way ANOVA are reasonably met.
  11. Explain why testing many pairs of groups inflates the probability of a false positive, and use a correction for multiple comparisons (e.g. Bonferroni, Tukey HSD).
  12. Decide whether one-way ANOVA is appropriate for a described study design and response variable.
  13. Recognise a correct and complete statement of one-way ANOVA results.

Book chapter

This week we will be covering Chapter 5: One-way ANOVA of the course book.

Video and code walkthrough

Each chapter of the course book has a code walkthrough: an R script with the code of the chapter, with comments explaining each step, and a video in which Owen works through the script. Use them to learn the R code you need this week. Work through them before the practical, ideally running the script line by line while you watch the video. The last section of the script (“Practical toolbox”) shows code that the practical uses but the chapter does not.

Script: walkthrough_ch05_anova.R

To download the script straight into your RStudio project folder (for example on RStudio Server), run this line in the Console:

download.file("https://opetchey.github.io/BIO144_Course_Book/walkthroughs/walkthrough_ch05_anova.R", destfile = "walkthrough_ch05_anova.R")

Video: coming soon.

Lecture

Please attend the lecture. If for any reason you can’t, please watch the podcast, which is available on OLAT.

Optional: some ideas for how you could prepare for the lecture (no preparation is also fine) are in Preparing for lectures.

Homework, Practical, and Weekly Quiz

Available here. You will need to be on a UZH network to access this link, so if you are not on campus, you will need to connect to the UZH VPN first.