Chris Mainey is a Senior Data Scientist/Statistician/Analyst in health informatics. He is a member of the Healthcare Evaluation Data (HED) team at University Hospitals Birmingham NHS Foundation Trust (UHB), and leads development of data science techniques in informatics at UHB.

Chris’ work focuses on modelling National Health Service (NHS) data. He works primarily in R and SQL Server, and has experience with various statistical modelling and machine learning techniques. He completed his PhD at UCL, on modelling NHS incident reporting data using quantitative methods and text mining.

Chris is an experienced trainer, presenter, and post-grad teacher, keen on communicating health data, statistics and ML techniques to a variety of audiences. He leads a local R usergroup at UHB, is a member of the NHS-R community Technical Advisory Group, and is keen to promote R awareness and adoption in the NHS.

This is a personal blog/website and does not reflect the opinions of UHB, HED or any other organisation.


  • R
  • NHS and Healthcare data
  • Statistical Modelling
  • Machine Learning
  • Natural Language Processing
  • Teaching


  • PhD in Applied Statistics and Machine Learning, 2020

    University College London (UCL)

  • PGC in Public Health, 2015

    University of Birmingham

  • BSc in Microbiology with Industrial Experience, 2006

    University of Manchester

Recent Posts

Survival analysis in R in 15 minutes

An overview of survival analysis in R in 15 minutes (or there abouts)

Learning new-tidyr and a cheeky steal from purrr

A quick bit of new-tidyr / pivot learning, and a cheaky steal from purrr for good measure

Why mgcv is awesome

Why building Generalized Additive Models (GAMs) using the mgcv package is a great idea.

Reflections on building my first few R packages

HEDfunctions, FunnelPlotR and NHSRdatasets reflections

RSS2019 conference

Royal Statistical Society (RSS) Conference 2019 Talk: Using funnel plots and CUSUM techniques to monitor hospital-standardised mortality I’m speaking this week at the Royal Statistical Society Conference, on 5th September, at Belfast ICC. Quite excited about this one, as I learnt so much from the RSS conference last year. I’m in the ‘Hospital Outcomes’ session in the afternoon. If you have an interest, it would be great to see you there.

Recent & Upcoming Talks

Text Mining Patient Safety Data

This talk will discuss my PhD work in text mining patient safety incident reports in the NHS.

Why is my model so bad?: Tales of a wandering PhD studentDriving R adoption in an NHS information service, barriers and solutions

Tales of learing to build count data models when you can’t tell if you’re wrong.

Building funnel plots for comparing standardised ratios, the FunnelPlotR package

We will discuss what funnel plots are, how to build them, what overdispersion is and how we can adjust plots for this. We’ll see the FunnelPlotR package and how it works.

Adopting R in an NHS informatics department

Summary of our use and adoption of R, and how this might help other organisations.

Why `mgcv` is awesome

A lightning talk tour of why mgcv is awesome, including what regression models are, options for dealing with non-linear relationships, what splines are, and how we can use splines in a Generalized Additive Modle (GAM). Simon Wood’s excellent mgcv package makes this easy to build and fit.

Software and R Packages


NHSRdatasets - a collaborative datasets package for teach and learning R in healthcare contexts


FunnelPlotR - an R package for building funnel plots for indirectly standardised ratios



Senior Statistical Intelligence Analyst

Healthcare Evaluation Data (HED) - Univ. Hospitals Birmingham NHS FT

Jan 2020 – Present Birmingham, UK

Senior Analyst and data science lead. Responsibilities include:

  • Leading on development and implementation of data science methods at UHB
  • Statistical and Machine Learning Modelling
  • Building tools and systems in R and SQL
  • Planning and line management
  • Managing departmental learning and development function
  • Leading series of commercial R-training courses

Postgraduate Teaching Assistant

University College London (UCL)

Sep 2015 – Sep 2018 London, UK
Leading seminars/teaching sessions, and lecturing on statistics and use of evidence for medical school, leading seminars and group practicals on Masters in Data science for Healthcare, and marking for undergraduate medical school projects and quantitative psychology masters dissertations.

Intelligence Analyst

Healthcare Evaluation Data (HED) - Univ. Hospitals Birmingham NHS FT

Jun 2012 – Jan 2020 Birmingham, UK

Senior Analyst and statistical lead. Responsibilities include:

  • Data Analysis
  • Statistical and Machine Learning Modelling
  • Building tools and systems in R and SQL
  • Planning and line management
  • Training and presentation to customers and staff

Data Manager (AIR Study)

University Hospitals Birmingham NHS Foundation Trust/University of Birmingham

Jan 2011 – Jun 2012 Birmingham, UK
Data linkage and algorithm development for following up attendances, vaccinations and blood tests in HIV-patient cohort.

Informatics Analyst

University Hospitals Birmingham NHS Foundation Trust - Health Informatics

Jan 2011 – Jun 2012 Birmingham, UK
Monthly hospital KPI reporting process & HIV dashboard and analytics development.

Cancer Informatics Analyst

Arden Cancer Network

Mar 2010 – Jan 2011 Coventry, UK
Informatics support and analysis for various network projects including surveys design and data capture, monthly cancer waiting times reporting, and data analysis and preparation for peer review.

Information Officer

West Midlands Cancer Intelligence Unity (WMCIU)

Mar 2009 – Mar 2010 Birmingham, UK
Production of regular cancer registration statistics, ad-hoc and specialist reports, and supervision of other teams members.