Course overview

Author

Vicki Hodgson, Matt Castle, Rob Nicholls and Martin van Rongen*

Published

July 25, 2025

Overview

Welcome to the wonderful world of generalised linear models! These sessions teach you how to analyse non-continuous responses, such as binary (yes/no) and count data. Our primary focus is not on mathematical derivations, but on developing an intuitive understanding of the underlying statistical concepts and applying these to data. We use programming languages to help us with this and hope that, by the end of this course, you’ll be confident to apply these concepts to your own research data.

Learning Objectives

To know what to do when presented with an arbitrary data set e.g.

  1. Construct
    1. a logistic model for binary response variables
    2. a logistic model for proportion response variables
    3. a Poisson model for count response variables
    4. a Negative binomial model for count response variables
  2. Plot the data and the fitted curve in each case for both continuous and categorical predictors
  3. Assess the significance of fit
  4. Assess the goodness-of-fit
  5. Assess assumption of the model

Target Audience

These materials are aimed at people who have to analyse (research) data and encounter non-continuous responses.

Prerequisites

A solid understanding of statistics, ideally through attending our Core statistics course. Additionally, a good working ability for coding is required - either in R or Python. See our Data analysis courses as an example.

All current scheduled events can be found here.

Exercises

Exercises in these materials are labelled according to their level of difficulty:

Level Description
Exercises in level 1 are simpler and designed to get you familiar with the concepts and syntax covered in the course.
Exercises in level 2 combine different concepts together and apply it to a given task.
Exercises in level 3 require going beyond the concepts and syntax introduced to solve new problems.

Citation & Authors

Please cite these materials if:

  • You adapted or used any of them in your own teaching.
  • These materials were useful for your research work. For example, you can cite us in the methods section of your paper: “We carried our analyses based on the recommendations in YourReferenceHere”.

You can cite these materials as:

Hodgson, V., Castle, M., Nicholls, R., van Rongen, M. (2025). Generalised linear models. https://cambiotraining.github.io/stats-glm

Or in BibTeX format:

@misc{YourReferenceHere,
  author = {Hodgson, Vicki and Castle, Matt and Nicholls, Rob and van Rongen, Martin},
  month = {7},
  title = {Generalised linear models},
  url = {https://cambiotraining.github.io/stats-glm},
  year = {2025}
}

About the authors:

  • Vicki Hodgson
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: writing - review & editing; conceptualisation; software
  • Matt Castle
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: conceptualisation; writing
  • Rob Nicholls
    Affiliation: Science and Technology Facilities Council, Rutherford Appleton Laboratory, Didcot
    Roles: conceptualisation
  • Martin van Rongen
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: writing - review & editing; conceptualisation; software

Acknowledgements

  • We thank Hugo Tavares for constructive feedback on the manuscript.