skip to primary navigation skip to content

Various stuff about fMRI/EEG/MEG statistical analysis...


  • Versions of many of the functions below can also be found on GitHub here: https://github.com/MRC-CBU/riksneurotools

  • Efficient fMRI design

  • How to design efficient fMRI experiments
  • Matlab function for calculating efficiency of fMRI GLMs: fMRI_GLM_efficiency.m

  • ANOVAs/GLM in SPM/Matlab

  • ANOVAs in SPM
  • Matlab function for N-way repeated measures ANOVAs: repanova.m
  • Matlab function for N-way mixed ANOVAs in SPM5/SPM8: batch_spm_anova.m
  • Matlab script for simulating pooled versus partitioned errors: check_pooled_error.m
  • Matlab function for generic GLM: glm.m
  • Comparing a single patient vs a Group (in SPM)

  • SPM stuff

  • SPM Course Slides from 2008
  • Some Example fMRI/EEG/MEG SPM5 batch scripts
  • Single-subject (1st-level) event-related fMRI analysis in SPM Manual and Data
  • Group-based (2nd-level) event-related fMRI analysis in SPM Manual and Data
  • Extract data for multiple ROIs from multiple datafiles: roi_extract.m
  • Example of Source Localisation of EEG and MEG data in SPM5: Manual and Data (~80MB)
  • Reading FIF MEG files into SPM5: click here for more info

  • Datasets

  • A multi-subject, multi-modal (T1, BOLD, DWI, EEG, MEG) dataset for methods development: click here for more info

  • Misc

  • A Matlab toolbox for Strutural Equation Modelling (developed by Nitin Williams): click here for more info
  • Matlab function for calculating NxN functional connectivity between all pairs of fMRI timeseries for N ROIs: rsfMRI_GLM
  • Matlab function for detecting artefacts in EEG/MEG data using ICA and (bootstrapped) temporal correlations with EOG/ECG and/or spatial correlations with standard template topographies: detect_ICA_artefacts
  • Matlab functions for computing multivariate Distance Correlation measure for fMRI functional connectivity
  • Matlab functions for computing LSS vs LSA GLM efficiency for fMRI


  • Use at own risk!
    genesis();