Skip to main content

Unit 7

Introduction

Welcome to Week 7 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 what an interaction between two explanatory variables means, both biologically and in the model equation.
  2. Distinguish additive from interactive effects using graphs of data or of model predictions.
  3. Explain why one model with several explanatory variables (and their interaction) is preferable to several separate single-variable analyses.
  4. Use R to fit models with interactions between two categorical variables (two-way ANOVA), a categorical and a continuous variable (ANCOVA), and two continuous variables.
  5. Interpret interaction coefficients, including how the meaning of the main-effect coefficients changes when an interaction is in the model.
  6. Use R to calculate and plot how the effect of one explanatory variable depends on the value of another.
  7. Test whether an interaction is needed, and judge whether it is biologically meaningful.
  8. Calculate the degrees of freedom of main effects and interaction terms, and the residual degrees of freedom, from the number of parameters a model estimates.
  9. Recognise a correct and complete statement of results from a model with an interaction.

Book chapter

This week we will be covering Chapter 7: Interactions 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_ch07_interactions.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_ch07_interactions.R", destfile = "walkthrough_ch07_interactions.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.