Online tutorial

Getting started with linear models

Concepts, coding, and biological examples

Graphics image showing data distribution and bar plots. Image credit: Karen Arnott/EMBL

Time to complete:

3 hours

This course includes:

  • Activities

Written by:

Last reviewed:

February 2026


Creative Commons

All materials are free cultural works licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license, except where further licensing details are provided.


Share this course with:

Linear models are widely used to analyse data across scientific disciplines, especially in biology to compare groups and study responses to treatments or environmental changes. In this tutorial, you will learn how to use linear models to identify patterns, test hypotheses, and analyse real biological data through hands–on exercises in R.

Feedback and help

Who is this course for?

Are you looking to confidently build your own linear models or finally understand the math behind the tools you use? This course is ideal for life scientists and researchers who want to strengthen their data analysis skills. This self–paced tutorial lets you learn at your own speed with regular exercises and quizzes to keep you engaged and on track. Basic knowledge of R is helpful for the coding exercises but not strictly necessary.

What will I achieve?

By the end of the course you will be able to:

  • Describe and use simple and multiple linear regression models to explore relationships between variables
  • Incorporate and interpret dummy variables to include categorical predictors (e.g. sex or diet)
  • Translate regression models into matrix form to understand their algebraic structure
  • Interpret regression coefficients to explain what each value means
  • Relate linear regression to t–tests and ANOVA to test group differences within a unified framework
  • Apply all concepts using R, working hands–on with biological datasets

DOI: 10.6019/TOL.linear-models-t.2026.00001.1