MediationToolbox

Single-level and multi-level mediation analyses for any kind of data, with bootstrap-based significance testing.

https://canlab.github.io/

You are now following this Submission

This toolbox contains functions to aid in single- and multi-level mediation analyses of any kind of data. The main function, mediation.m, examines 3 timeseries to determine if one of them acts as a mediator between the other two. Works for both single-level and multi-level (multiple subjects/observations) data. There is a brain imaging specific mediation search function that takes two variables and searches functional MRI data for potential mediators. The toolbox also includes visualization and plotting functions for mediation analyses, and various computational support functions.

The Mediation_walkthrough folder contains a powerpoint presentation with a step-by-step example single-level mediation analysis of example brain data. See https://canlab.github.io/walkthroughs/ for more examples.

Cite As

Tor Wager (2026). MediationToolbox (https://github.com/canlab/MediationToolbox), GitHub. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.