Unit 8

Introduction

Welcome to Week 8 of BIO144!

Course book

This week we will be covering Chapter 8: Generalised linear models for count data of the course book.

Code walkthrough

The R code of this week’s chapter is in a code walkthrough script, with a video walkthrough of it. Both are linked at the top of the course book chapter. Work through them before the practical: the last section of the script (“Practical toolbox”) shows code that this week’s practical uses but the chapter does not.

Learning objectives

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. Identify biological questions and study designs in which the response variable is a count.
  2. Explain why linear models with normal errors are often inappropriate for count data (counts are non-negative integers, and their variance tends to increase with the mean).
  3. Describe the three components of a generalised linear model: the linear predictor, the distribution family and the link function.
  4. Use R to fit a Poisson regression with glm().
  5. Explain null and residual deviance as measures of fit for a GLM, analogous to sums of squares in a linear model.
  6. Check the assumptions of a Poisson GLM using diagnostic plots, recognising that QQ-plots of deviance residuals are interpreted differently from those of a linear model.
  7. Interpret coefficients on the log (link) scale, and back-transform them to multiplicative effects on the expected count.
  8. Use R to calculate predicted counts for given values of the explanatory variables.
  9. Use deviance-based tests to judge whether explanatory variables are associated with the response.
  10. Explain that in a chi-squared (likelihood ratio) test between nested GLMs, the degrees of freedom equal the difference in the number of estimated parameters.
  11. Detect overdispersion and select an appropriate response to it (e.g. a quasi-Poisson or negative binomial model).
  12. Recognise zero inflation in count data, and that it requires models beyond the Poisson GLM.
  13. Recognise a correct and complete statement of results from a Poisson regression.

Lecture

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

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.