NHS-R Workshop: Modelling non-linear data with Generalized Additive Models (GAMs), using the mgcv package

  • Wednesday 12 June 2024 with Dr Chris Mainey
  • 09:30am until 12:00pm (UK time)

Course Description:

This workshop is a follow-on from Chris’ NHS-R conference 2022 talk on modelling ‘wiggly’ data using Generalized Additive Models. Regression models are a great approach for modelling relationships, but they make certain assumptions about linear relationships that don’t always hold true in real-world datasets.

The workshop is aimed at people who have some experience of regression modelling and want to take it further, learning a more advanced and flexible class of modelling that also applies to non-linear data.

This workshop will introduce linear and non-linear data and how they fit with regression models. We’ll discuss how the positives and negatives of different approaches like ‘binning’ into categories, or using a linear fit, over non-linear data. We’ll introduce polynomials and ‘splines’ before building them into a class of models referred to as a Generalized Additive Model (GAM).
We will then walk through several simple health-based examples with GAM discuss how to interpret them, how to assess the fit, and how to visualise the smooth functions.

We will finish the workshop with a more complicated example, asking attendees to fit the model, examine the smoothers and answer a couple of questions about them.


Please register via the Sign up link in the right panel.
You will need to register as a member of the NHS-R Community to register for NHS-R Events.

You will receive a confirmation email, further workshop information including the calendar invite with the Zoom link to join the workshop will be sent out to you nearer the date.

Please note: This course is limited to Core members – details are in the NHSR Way book.

For further information, please contact: nhs.rcommunity@nhs.net

Event Speakers

Dr Chris Mainey

Head Data Scientist

Chris is Head Data Scientist for NHS Birmingham and Solihull Integrated Care Board, working on problems like forecasting, regression modelling, risk-adjustment and stratification, simulation and anything else interesting!

He has led analytical teams at North Central London ICB and NHSE, and has analytical experience in patient safety, population health management, clinical networks, and acute trust informatics.

He completed his PhD in applied statistics and machine learning at UCL in 2020, focussing on methods for analysing incident reporting data in the NHS using multi-level regression models, Generalized Additive Models, tree and random forest methods and natural language processing (NLP). He enjoys training and teaching and is a senior fellow of the NHS-R community.

Event Type


Event Date

June 12, 2024

Event Time

9:30 am - 12:00 pm

Event Venue


Event Capacity


Share this Event via: