Lecture slides, tutorials, and notes developed over 15+ years of teaching at summer schools, workshop courses, and university courses. All slides are freely available. Topics span fMRI design and analysis, M/EEG signal processing and statistics, general linear modelling, robust statistics, and digital signal processing.
fMRI
Most of what you need to think about for fMRI is described in the OHBM MRI COBIDAS. Understanding the subtleties of design, QA, and statistics requires some basic knowledge of how MRI works — see the MRI physics lecture in the SPM archive below.
Standalone Lectures
Experimental Design Notes
Functional MRI designs are more constrained than behavioural experiments because we must think simultaneously about experimental effects and fMRI acquisition parameters. Three broad families of design exist:
Block designs are powerful for detection — localising regions that respond differentially to a condition. Blocks of ~16 s optimise the trade-off between BOLD signal strength and noise at typical acquisition frequencies; shorter blocks do not allow the response to return to baseline, reducing contrast.
Event-related designs allow estimation of the haemodynamic response shape per condition and support random stimulus ordering, but have lower detection power than blocks. Rapid event-related designs introduce null events to create differential ISI overlap, enabling a full characterisation of the response.
Mixed designs combine block-level state effects with event-level transient responses, enabling study of processes that operate at different timescales.
Adaptation (carry-over) designs exploit the BOLD refractory period: if two successive stimuli differ in a property coded by a region, the response to the second stimulus is less suppressed (fMRI-A). The linear BOLD assumption holds for ISI ≥ 4 s; continuous carry-over designs (Aguirre, NeuroImage, 2007) extend this to continuously changing stimulus streams.
See also: Design Optimisation (in the SPM archive below).
Quality Assurance
Quantifying noise at every stage of the processing workflow is essential for reliable results. See:
- Blog: Cleaning BOLD time series — sources of noise and how to measure them
- Blog: Minimising motion artefacts — motion metrics and mitigation strategies
- SPMup on GitHub — MATLAB toolbox that automates QA and incorporates noise measures into analyses
Statistics Notes
Adaptive thresholding for single-subject maps. The distribution of voxel-level statistics at the subject level is not always central (mean ≠ 0). Standard fixed thresholds therefore over- or under-estimate effects. Modelling the distribution as a mixture of a non-central Gaussian (null) and positive/negative Gamma distributions for the tails identifies the crossing point that optimally separates signal from noise. Paper · SPMup code
Boosting beta estimates with HRF derivatives. When the haemodynamic response function is mis-specified (e.g. onset earlier than the standard model), adding the temporal derivative improves model fit but leaves the amplitude estimate biased. A correction step recovers the true amplitude. Tutorial paper · SPMup code
Computing percentage signal change. After convolving regressors with the HRF, the design matrix does not scale to 1, so raw beta values are not interpretable as % BOLD change without rescaling. The choice of reference (maximum of a single trial, maximum of the design) is arbitrary but must be consistent. Tutorial paper · SPMup code
M/EEG
Most of what you need for reproducible M/EEG research is described in the OHBM COBIDAS MEEG guidelines.
Standalone Lectures
Video Tutorials
A full video tutorial series on EEG data organisation and analysis with EEGLAB and BIDS is available on YouTube:
- EEGLAB BIDS Tutorial Series — playlist covering BIDS import/export, metadata, and group analysis
Statistics Notes
LIMO MEEG provides full sensor- or source-space hierarchical GLM for EEG and MEG data, 100% compatible with EEGLAB (GUI integration via the STUDY framework) and FieldTrip. See LIMO on GitHub and the Software page for details.
Multiple comparison corrections for M/EEG must account for the massive number of simultaneous tests across sensors, sources, and time. As part of LIMO, bootstrap-based corrections and cluster-level inference have been developed specifically for the M/EEG sensor–time space. See: Blog post on bootstrapping and multiple comparisons
Statistics & Signal Processing
General Linear Modelling
Neuroimaging is built on linear algebra: understanding matrix operations directly gives you the GLM, regression, ANOVA, and most of inferential statistics.
- Introduction to vectors — the connection between geometry and algebra
- Basic matrix operations — a short review covering all the essentials
- MIT Linear Algebra (18.06) — the gold-standard free course (Gilbert Strang)
- MATLAB GLM page — interactive worked examples: simple regression, multiple regression, ANOVA via matrix inversion
- What makes a contrast orthogonal? — a short write-up on linear independence and orthogonality in the GLM
- Linear independence, orthogonality and correlation — a classic one-page article
Robust Statistics
Ordinary Least Squares has a 0% breakdown point — a single outlier can dominate the solution. Trimmed means, robust correlations, and tests based on Winsorised estimates provide reliable alternatives that still have good power under normality.
- Robust Correlations toolbox — Pearson alternatives with confidence intervals; skipped, percentage-bend, and Spearman correlations
- Robust Statistical Toolbox — tests based on robust estimators for one-sample, two-sample, and factorial designs
Digital Signal Processing
Fourier analysis underlies most of what we do in signal processing, from band-pass filtering EEG to characterising the BOLD noise spectrum.
- Fourier Analysis — lecture notes with MATLAB code — 1D and 2D Fourier transforms, filtering, practical applications
SPM Edinburgh Course Archive (2010–2019)
A curated archive of lectures from the Edinburgh SPM course, run annually from 2010 to 2019. Slides cover the full analysis pipeline from MRI physics to Bayesian inference.
Thank you to all colleagues who gave lectures over the years: Dr Devasuda Anblagan, Dr John Ashburner, Dr Roselyne Chauvin, Dr Ian Charest, Dr Justin Chumbley, Dr Jean Daunizeau, Dr Christian Gaser, Dr Nikolaus Kriegeskorte, Dr Daniele Marinazzo, Dr Martin McFarquhar, Dr Alexa Morcom, Dr Thomas Nichols, Dr Jean-Baptiste Poline, Dr Christophe Phillips, Dr Mohamed Seghier, Dr Jason Taylor & Dr Thomas Wolpers.
Thank you to the hundreds of colleagues and students who attended the course.
Foundations
Preprocessing
- Slice timing correction (within-subject)
- Realignment and coregistration (within-subject)
- Normalisation and smoothing (between-subject)
- Morphometry: volumes
- Morphometry: surfaces
Experimental & fMRI Designs
Univariate Statistical Modelling
Multivariate Statistical Modelling
Statistical Inference & Visualisation
- Designs and inference for fMRI
- Inference in univariate and multivariate models
- Multiple comparisons correction
- Multiple comparisons correction, levels of inference, circularity
- Inference and result visualisation