Day 2 · Modeling, connectivity, and ICA

Day 2Session 2.9Wager1:00 hHands-on session

Intro to connectivity and mediation; mediation demo/walkthrough

This session situates mediation analysis within the landscape of connectivity methods, then explains the mediation and moderation path models, the a*b indirect effect, and bootstrap inference. It introduces Mediation Effect Parametric Mapping with the CANlab Mediation Toolbox, illustrated with emotion regulation, stress and heart rate, and expectancy and pain studies, and walks through the toolbox tutorial.

Take-aways

  • Mediation links an experimental manipulation, a brain measure, and an outcome in a single model and tests the indirect effect a*b with a bootstrap.
  • MEPM searches the brain for voxels that mediate, at a single level (one contrast image per person) or multilevel (trials or time points within person).
  • Path models specify assumptions transparently, but causal claims require a randomized x and awareness of unmodeled variables.

Key terms

  • effective connectivity
  • mediation
  • moderation
  • indirect effect (a*b)
  • direct effect (c')
  • bootstrap test
  • BCa bootstrap
  • Mediation Effect Parametric Mapping
  • multilevel mediation
  • Mediation Toolbox (M3)
Brain mediation path diagram from noxious input to avoidance
Brain mediation path diagram from noxious input to avoidance. Lecture 2.9 slides (Wager)

Outline

What the session covers

01Two families of connectivity analysis

  • Functional connectivity models broad patterns of connections: functional connectome, ICA, clustering, graph metrics.
  • Effective connectivity models direct, often directional connections: path models among observed series and dynamic causal models among dynamic changes.
  • Data-reduction approaches (PCA, ICA, PLS, tensor-ICA) identify distributed patterns; path-modeling approaches (path models, PPI, SEM, Granger causality, DCM) test specific connections.
  • The two families can be complementary.

02Mediation and moderation

  • Mediation asks about mechanism: an exposure or manipulation affects an outcome via a mediator, e.g., drug to striatal dopamine to clinical benefit.
  • Equations: m = i_m + a*x + e_m and y = i_y + b*m + c'*x + e_y; the mediation (indirect) effect is a*b.
  • Path c is the total effect and c' the direct effect; testing c minus c' equals testing a*b, and complete mediation means c' = 0.
  • Baron and Kenny framed mediation as the conjunction of a, b, and c effects, though c need not be significant (Kenny, Kashy and Bolger 1998).
  • Moderation asks whether the level of m changes the x-y relationship, modeled as an interaction term.
  • Significant a and b effects are not enough; a*b tests whether both are jointly large enough to explain c.
Mediation path maps on sagittal and axial brain slices
Mediation path maps on sagittal and axial brain slices. Lecture 2.9 slides (Wager)
Cortical parcellation rendered on the lateral surface
Cortical parcellation rendered on the lateral surface. Lecture 2.9 slides (Wager)

03Inference on the indirect effect

  • The Sobel test (Aroian version) is usually over-conservative.
  • Bootstrap test: resample rows of [x m y] with replacement, compute a*b, repeat 1,000-10,000 times, and derive confidence intervals and p-values from the distribution.
  • Bias-corrected, accelerated (BCa) bootstrapping is the toolbox default; permutation testing is also available.

04Mediation Effect Parametric Mapping (MEPM)

  • Search brain voxels or regions for mediators, producing maps of a, b, a*b, and their conjunction.
  • Single-level mediation: one observation per person on X, M, Y, with M usually a contrast image; this covers most applications.
  • Multilevel mediation: repeated observations per person (ordered conditions, single trials, or volumes), with subject-level paths as random effects; c - c' = a*b + cov(a,b).
  • Use cases: task to brain to behavior, brain to brain to physiology, population to brain to symptom.
  • Toolbox features: multiple mediators and covariates, logistic outcomes, second-level moderators, three-path mediation, latent HRF basis for fMRI mediators, AR(p) errors, multivariate mediation.

05Examples and cautions

  • Wager et al. 2008 (Neuron): 30 participants reappraising versus viewing negative images; prefrontal-subcortical pathways mediated reappraisal success.
  • Wager et al. 2009: multilevel mediation of speech preparation on heart rate via pregenual ACC; moderated mediation was strongest in heart-rate 'reactors'.
  • Atlas et al. 2010: separate analyses of cue effects on pain and brain cannot show which voxels transmit the effect; mediation tests a*b per voxel.
  • Causal interpretation depends on unmodeled variables; avoid strong causal claims unless x is an experimentally randomized variable.
PINES negative-affect signature rendered on cortical surfaces — Chang et al. (2015), PLoS Biology

Hands-on

Step by step

The walk-through below is distilled from the course cheat sheets. Data paths refer to the course Dropbox folder (e.g. data/auditory_oddball).

  1. Download CanlabCore and MediationToolbox from github.com/canlab and add both to the MATLAB path with subfolders.
  2. Read through the basics tutorial at canlab.github.io/_pages/tutorials/html/mediation_1_basics.html.
  3. Download the corresponding live script (.mlx) from canlab.github.io/walkthroughs/ and open it in MATLAB.
  4. Run mediation.m on vectors X, Y, and M with bootstrapping enabled; examine the a, b, c, c', and a*b estimates, bootstrap p-values, and built-in path and scatter plots.
  5. Optionally add covariates or a second mediator to see how estimates change.
  6. Open the brain walkthrough at canlab.github.io/_pages/tutorials/html/mediation_brain_single_level_walkthrough1.html and download its live script.
  7. Set up the single-level brain mediation: X is the experimental variable, Y the outcome, and M a set of per-subject contrast images.
  8. Run mediation_brain.m to search across voxels, producing a, b, a*b, and conjunction maps.
  9. Use the toolbox results commands to save tables, montages, plots, surfaces, and data extracted from significant regions.
  10. For repeated-measures data, review mediation_brain_multilevel.m, which fits subject-level paths as random effects.

From the instructors' research

Related figures

Examples of these concepts in published work by the course instructors.

Hierarchical network of core regions linking sensory and multimodal systems
Hierarchical network of core regions linking sensory and multimodal systems. Čeko et al. (2022), Nature Neuroscience
Path model with brain networks mediating reappraisal success
Path model with brain networks mediating reappraisal success. Wager et al. (2008), Neuron