Single-level mediation with neuroimaging data

This tutorial demonstrates the use of mediation_brain to run a single-level mediation analyses on a sample dataset (an emotion regulation dataset from Wager et al. 2008, Neuron).
Table of Contents

Background

Mediation analysis: The basics

Mediation is a useful tool for connecting variables into pathways. It extends the idea of a simple association between two variables (let's call them x and y) to a pathway involving three (or more) variables. Let's write the association x predicts y like this: [ x -> y ]. This relationship is shown graphically in the diagram below:
basic_two_var.png
Suppose we hypothesize that the effect of x on y is transmitted via its influence on an intermediate variable, m. With mediation analysis, you can build a model of associations among three variables, i.e., [ x -> m -> y ]. m is a mediator, a variable that explains some or all of the relationship between x and y.
basic_mediation.png
Mediation models are especially useful for developing models in which an association between two variables is transmitted via a third variable. For example, the effects of a psychological stressor (x) on heart rate (y) may be mediated by activity in brain systems responsible for threat. The stressor activates the brain, and the brain in turn controls the heart.
In mediation analysis, x is called the initial variable. it will often be an experimental variable (IV) that is experimentally manipulated, but it doesn't have to be. y is called the outcome variable (or dependent variable), and it is usually the endpoint that one is interested in explaining. m is the mediator, and is usually a variable that is thought to be important for transmitting the effect of x on y, or on the "causal path" from x to y. It is also possible to include multiple initial variables, multiple mediators, and other covariates in such models. The broader family that the [ x -> m -> y ] model belongs to is called path models.

Brain mediators and mediation effect parametric mapping (MEPM)

Mediation is a natural fit for neuroimaging data because it lets us examine the relationships between experimental variables (e.g., task conditions), brain responses (e.g., contrast values), and outcomes (e.g., behavior or experience) in a single model. These relationships would often be tested piecemeal in standard GLM analyses. The mediation analysis allows us to identify brain regions with effect sizes for the task -> brain and brain -> outcome relationships that are jointly large enough to explain task effects on the outcome. Other use cases include:
Mediation analyses can be done at two levels. In single-level mediation, there is one observation per person. Each person has a value for x, m, and y, and the mediation model tests correlations between individual differences in scores on each variable. This is the most common type of mediation analysis. In multi-level mediation, we manipulate tasks and observe both brain activity and behavioral responses (e.g., ratings or performance) within-person across time (or trials in task).
The Multilevel Mediation and Moderation (M3) Matlab Toolbox will perform both single- and multilevel mediation. The function mediation.m can operate on any type of input data (behavior, psychosocial measures, physiology, brain, genetics, etc.), and will run both single and multilevel mediation depending on the input data.
The toolbox also has special functions for running mediation on each voxel in a neuroimaging dataset (single or multilevel) and saving maps of mediation effects:
mediation_brain % for single-level mediation
mediation_brain_multilevel % for multilevel mediation
Here, we'll explore single-level mediation, and we'll deal with the multi-level case in a later tutorial. So we'll run mediation_brain. This function takes a series of brain images (i.e., one image per person) as one of its inputs (either x, m, or y). The other inputs are vectors, with one observation per person. mediation_brain will load the images from (a) a series of 3-D .nii or .img files [one per person] or (b) a 4-D .nii file with one volume per person. It will run mediation analysis with mulitple options (e.g., bias-corrected, accelerated bootstrap tests and robust regression are desirable) on each voxel individually, saving the path a, path b, and a*b mediation effects in image files.
The output is a set of brain images with the Path a slopes ("effects") and P-values, Path b slopes and P-values, and a*b slopes and P-values. Special functions like mediation_brain_results help to load these images and get, show, and make tables of results. Scripts including mediation_brain_results_all_script generate a whole set of results, tables, and figures for multiple effects. publish_mediation_report generates a series of results figures and tables and saves them in a date-stamped HTML report.
For example, if we're testing whether
-- but most often m, if we're testing brain activity as a mediator of something else).

About the dataset

"Wager_et_al_2008_Neuron_EmotionReg" The dataset is a series of contrast images from N = 30 participants. Each image is a contrast image for [reappraise neg vs. look neg]
These data were published in: Wager, T. D., Davidson, M. L., Hughes, B. L., Lindquist, M. A., Ochsner, K. N.. (2008). Prefrontal-subcortical pathways mediating successful emotion regulation. Neuron, 59, 1037-50.
In this study, each participant performed three tasks:
(1) Viewing affectively neutral images (Look Neu)
(2) Viewing aversive images (Look Neg)
(3) Viewing aversive images and reappraising them to make them less aversive (Reapp Neg)
For example, when reappraising the spider image below, you might notice the egg sacs on her back and realize that this is a cute momma spider.
Negative affect reports are shown for the three conditions below. Reappraising caused a significant drop in self-reported affect (red vs. blue bars). The difference scores for this [Reappraise Negative - Look Negative] contrast are defined as "Reappraisal success" for a person.
emoreg_mediation.png
In this tutorial, we'll identify regions that mediate effects of a pre-defined lateral prefrontal (PFC) region of interest on Reappraisal Success. We'll treat Reappraisal Success as the outcome (Y). The X values will be scores on the [Reappraise Negative - Look Negative] for each of 30 participants averaged over a right PFC region. For the mediator (M), we'll enter the name of a 4-D .nii image containing 30 [Reappraise Negative - Look Negative] images, one for each participant.
reapp_paths.png
mediation_brain will test the PFC -> [Voxel] -> Success pathway for each voxel in the brain, saving maps of each relevant effect.
The focus of the publication was on subcortical systems, particularly nucleus accumbens and amygdala. The published analyses used robust boostrapped analyses with 10,000 samples, which take a long time to estimate. The current version of this tutorial uses more "quick and dirty" methods and so produces different results -- but it illustrates the concept.

Analysis setup

Step 1: Make a new analysis directory to save results, and go there

Make a new analysis directory to save results, and go there
andir = 'Test_mediation';
mkdir(andir)
cd(andir)

Step 2: Load image data and behavioral variables

dinf = what('Wager_et_al_2008_Neuron_EmotionReg');
%imgs = filenames(fullfile(dinf.path,'con_*img'), 'char', 'absolute');
imgs = fullfile(dinf(1).path, 'Wager_2008_emo_reg_vs_look_neg_contrast_images.nii.gz');
behav_dat = importdata(fullfile(dinf(1).path,'Wager_2008_emotionreg_behavioral_data.txt'))
behav_dat = struct with fields:
data: [30×2 double] textdata: {'X_RVLPFC' 'Y_Reappraisal_Success'} colheaders: {'X_RVLPFC' 'Y_Reappraisal_Success'}
Note: an alternative, convenient way to load the imaging (but not behavioral) data into an object is below. This allows you to explore the dataset with other CANlab tools. There are a number of other datasets and brain patterns that can be loaded this way.
[data_obj, subject_names, image_names] = load_image_set('emotionreg', 'noverbose');

Step 3: Load and display mask

The mask determines which voxels are analyzed. The standard mask is in the CanlabCore Tools repository, so you need the folder containing it (and other CanlabCore folders) on your path.
mask = which('gray_matter_mask.img')
mask = '/Users/torwager/Documents/GitHub/CanlabCore/CanlabCore/canlab_canonical_brains/Canonical_brains_surfaces/gray_matter_mask.img'
canlab_results_fmridisplay(mask, 'compact2');
Using default mask: /Users/torwager/Documents/GitHub/CanlabCore/CanlabCore/canlab_canonical_brains/Canonical_brains_surfaces/brainmask_canlab.nii loading mask. mapping volumes. checking that dimensions and voxel sizes of volumes are the same. Pre-allocating data array. Needed: 971812 bytes Loading image number: 1 Elapsed time is 0.037759 seconds. Image names entered, but fullpath attribute is empty. Getting path info. Number of unique values in dataset: 27910 Bit rate: 14.77 bits Grouping contiguous voxels: 17 regions Setting up fmridisplay objects
axial montage: 41163 voxels displayed, 164384 not displayed on these slices
sagittal montage: 8079 voxels displayed, 197468 not displayed on these slices

Running the mediation

Step 4 : Run mediation without bootstrapping (a quick test)

Run mediation without bootstrapping (fast). Test that things are working.
This will save results files to disk. You can use results scripts to view and generate reports, or use any software you like to work with the effect images and P-value images.
output_files.png
mediation_SETUP.mat contains your input options, image names, input variables (e.g., x, y, covariates).
Note: There is a lot of output below. This is generated by the mediation program running over the brain. You can scroll past this to the RESULTS.
x=behav_dat.data(:,1);
y=behav_dat.data(:,2);
names = {'X:RVLPFC' 'Y:Reappraisal_Success' 'M:BrainMediator'};
% This is what you would run:
results = mediation_brain(x,y,imgs,'names',names,'mask', mask, 'noverbose');
Mask: /Users/torwager/Documents/GitHub/CanlabCore/CanlabCore/canlab_canonical_brains/Canonical_brains_surfaces/gray_matter_mask.img Rank data: No Statistics. =============================================== Slice 1 : 493 voxels in-mask Testing 493 valid columns of 493 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.21 -0.16 0.14 0.11 -0.03 STE 0.15 0.07 0.06 0.06 0.03 t (~N) 1.40 -2.12 2.30 1.71 -1.09 Z 1.37 -2.03 2.18 1.66 -1.07 p 0.1720 0.0427 0.0291 0.0974 0.2859 ________________________________________ Total time: 493Done in 5 s =============================================== Slice 2 : 715 voxels in-mask Testing 715 valid columns of 715 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.27 -0.16 0.15 0.11 -0.04 STE 0.15 0.08 0.06 0.06 0.03 t (~N) 1.82 -2.08 2.39 1.71 -1.28 Z 1.75 -1.98 2.26 1.66 -1.26 p 0.0799 0.0472 0.0240 0.0974 0.2095 ________________________________________ Total time: 715Done in 3 s =============================================== Slice 3 : 807 voxels in-mask Testing 807 valid columns of 807 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.17 -0.12 0.13 0.11 -0.02 STE 0.14 0.08 0.06 0.06 0.03 t (~N) 1.22 -1.47 2.03 1.71 -0.83 Z 1.19 -1.43 1.95 1.66 -0.82 p 0.2321 0.1540 0.0517 0.0974 0.4133 ________________________________________ Total time: 807Done in 3 s =============================================== Slice 4 : 931 voxels in-mask Testing 931 valid columns of 931 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.10 -0.01 0.11 0.11 -0.00 STE 0.27 0.04 0.07 0.06 0.01 t (~N) 0.37 -0.32 1.70 1.71 -0.10 Z 0.36 -0.31 1.65 1.66 -0.10 p 0.7165 0.7549 0.0997 0.0974 0.9179 ________________________________________ Total time: 931Done in 3 s =============================================== Slice 5 : 1076 voxels in-mask Testing 1076 valid columns of 1076 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.40 0.01 0.11 0.11 0.00 STE 0.36 0.03 0.07 0.06 0.02 t (~N) 1.13 0.27 1.59 1.71 0.20 Z 1.11 0.26 1.54 1.66 0.19 p 0.2671 0.7920 0.1228 0.0974 0.8457 ________________________________________ Total time: 1076Done in 3 s =============================================== Slice 6 : 1248 voxels in-mask Testing 1248 valid columns of 1248 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.66 0.01 0.10 0.11 0.01 STE 0.34 0.04 0.07 0.06 0.03 t (~N) 1.93 0.23 1.50 1.71 0.20 Z 1.85 0.23 1.46 1.66 0.20 p 0.0639 0.8212 0.1438 0.0974 0.8419 ________________________________________ Total time: 1248Done in 3 s =============================================== Slice 7 : 1383 voxels in-mask Testing 1383 valid columns of 1383 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 1.43 0.03 0.07 0.11 0.04 STE 0.49 0.02 0.07 0.06 0.04 t (~N) 2.91 1.16 0.95 1.71 1.02 Z 2.70 1.13 0.94 1.66 1.00 p 0.0069 0.2577 0.3486 0.0974 0.3152 ________________________________________ Total time: 1383Done in 3 s =============================================== Slice 8 : 1547 voxels in-mask Testing 1546 valid columns of 1547 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.90 0.02 0.09 0.11 0.02 STE 0.34 0.04 0.07 0.06 0.04 t (~N) 2.63 0.66 1.23 1.71 0.60 Z 2.47 0.65 1.20 1.66 0.59 p 0.0137 0.5177 0.2299 0.0974 0.5558 ________________________________________ Total time: 1547Done in 3 s =============================================== Slice 9 : 1614 voxels in-mask Testing 1613 valid columns of 1614 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.58 0.02 0.10 0.11 0.01 STE 0.27 0.04 0.07 0.06 0.03 t (~N) 2.12 0.38 1.42 1.71 0.34 Z 2.03 0.38 1.39 1.66 0.34 p 0.0425 0.7066 0.1656 0.0974 0.7367 ________________________________________ Total time: 1614Done in 3 s =============================================== Slice 10 : 1589 voxels in-mask Testing 1588 valid columns of 1589 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.71 0.03 0.09 0.11 0.02 STE 0.28 0.04 0.07 0.06 0.03 t (~N) 2.55 0.58 1.27 1.71 0.53 Z 2.41 0.58 1.24 1.66 0.53 p 0.0162 0.5635 0.2145 0.0974 0.5986 ________________________________________ Total time: 1589Done in 4 s =============================================== Slice 11 : 1515 voxels in-mask Testing 1515 valid columns of 1515 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.35 -0.04 0.12 0.11 -0.01 STE 0.14 0.09 0.07 0.06 0.03 t (~N) 2.43 -0.47 1.73 1.71 -0.43 Z 2.30 -0.46 1.67 1.66 -0.42 p 0.0213 0.6426 0.0946 0.0974 0.6725 ________________________________________ Total time: 1515Done in 3 s =============================================== Slice 12 : 1461 voxels in-mask Testing 1461 valid columns of 1461 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.27 -0.01 0.11 0.11 -0.00 STE 0.13 0.09 0.07 0.06 0.03 t (~N) 2.01 -0.08 1.60 1.71 -0.07 Z 1.93 -0.08 1.55 1.66 -0.07 p 0.0535 0.9356 0.1205 0.0974 0.9424 ________________________________________ Total time: 1461Done in 4 s =============================================== Slice 13 : 1451 voxels in-mask Testing 1451 valid columns of 1451 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.16 0.02 0.11 0.11 0.00 STE 0.14 0.09 0.07 0.06 0.02 t (~N) 1.17 0.20 1.60 1.71 0.15 Z 1.14 0.20 1.55 1.66 0.15 p 0.2524 0.8397 0.1209 0.0974 0.8789 ________________________________________ Total time: 1451Done in 2 s =============================================== Slice 14 : 1434 voxels in-mask Testing 1434 valid columns of 1434 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 1.04 0.04 0.07 0.11 0.04 STE 0.48 0.02 0.07 0.06 0.03 t (~N) 2.18 1.47 1.06 1.71 1.14 Z 2.08 1.43 1.04 1.66 1.12 p 0.0379 0.1527 0.2992 0.0974 0.2646 ________________________________________ Total time: 1434Done in 4 s =============================================== Slice 15 : 1337 voxels in-mask Testing 1337 valid columns of 1337 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.25 0.03 0.10 0.11 0.01 STE 0.14 0.08 0.07 0.06 0.03 t (~N) 1.74 0.41 1.48 1.71 0.35 Z 1.68 0.40 1.43 1.66 0.34 p 0.0926 0.6860 0.1513 0.0974 0.7312 ________________________________________ Total time: 1337Done in 2 s =============================================== Slice 16 : 1250 voxels in-mask Testing 1250 valid columns of 1250 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.18 0.04 0.10 0.11 0.01 STE 0.14 0.09 0.07 0.06 0.02 t (~N) 1.32 0.39 1.54 1.71 0.30 Z 1.29 0.38 1.50 1.66 0.30 p 0.1974 0.7010 0.1341 0.0974 0.7656 ________________________________________ Total time: 1250Done in 4 s =============================================== Slice 17 : 1165 voxels in-mask Testing 1165 valid columns of 1165 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.69 0.01 0.10 0.11 0.01 STE 0.34 0.04 0.07 0.06 0.03 t (~N) 2.02 0.29 1.47 1.71 0.26 Z 1.94 0.29 1.43 1.66 0.26 p 0.0525 0.7736 0.1527 0.0974 0.7981 ________________________________________ Total time: 1165Done in 4 s =============================================== Slice 18 : 1073 voxels in-mask Testing 1073 valid columns of 1073 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.36 0.15 0.06 0.11 0.05 STE 0.17 0.07 0.06 0.06 0.04 t (~N) 2.14 2.22 0.87 1.71 1.46 Z 2.04 2.11 0.85 1.66 1.42 p 0.0410 0.0351 0.3943 0.0974 0.1545 ________________________________________ Total time: 1073Done in 5 s =============================================== Slice 19 : 1097 voxels in-mask Testing 1097 valid columns of 1097 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.38 0.13 0.06 0.11 0.05 STE 0.19 0.06 0.06 0.06 0.04 t (~N) 2.03 2.06 0.95 1.71 1.37 Z 1.94 1.97 0.94 1.66 1.33 p 0.0520 0.0488 0.3489 0.0974 0.1830 ________________________________________ Total time: 1097Done in 4 s =============================================== Slice 20 : 1122 voxels in-mask Testing 1122 valid columns of 1122 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.32 0.13 0.07 0.11 0.04 STE 0.18 0.06 0.06 0.06 0.03 t (~N) 1.73 2.02 1.09 1.71 1.23 Z 1.67 1.94 1.07 1.66 1.20 p 0.0951 0.0526 0.2856 0.0974 0.2292 ________________________________________ Total time: 1122Done in 2 s =============================================== Slice 21 : 1091 voxels in-mask Testing 1091 valid columns of 1091 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.53 0.11 0.05 0.11 0.06 STE 0.21 0.05 0.07 0.06 0.04 t (~N) 2.50 2.09 0.75 1.71 1.53 Z 2.36 2.00 0.74 1.66 1.49 p 0.0185 0.0456 0.4610 0.0974 0.1366 ________________________________________ Total time: 1091Done in 2 s =============================================== Slice 22 : 1060 voxels in-mask Testing 1060 valid columns of 1060 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.49 0.08 0.07 0.11 0.04 STE 0.25 0.05 0.07 0.06 0.03 t (~N) 2.00 1.74 1.04 1.71 1.23 Z 1.92 1.68 1.02 1.66 1.20 p 0.0544 0.0936 0.3057 0.0974 0.2297 ________________________________________ Total time: 1060Done in 3 s =============================================== Slice 23 : 981 voxels in-mask Testing 981 valid columns of 981 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.28 0.03 0.10 0.11 0.01 STE 0.30 0.04 0.07 0.06 0.02 t (~N) 0.95 0.61 1.56 1.71 0.39 Z 0.93 0.61 1.51 1.66 0.38 p 0.3517 0.5438 0.1302 0.0974 0.7026 ________________________________________ Total time: 981Done in 2 s =============================================== Slice 24 : 929 voxels in-mask Testing 929 valid columns of 929 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.38 0.04 0.09 0.11 0.02 STE 0.32 0.04 0.07 0.06 0.02 t (~N) 1.20 1.06 1.44 1.71 0.67 Z 1.17 1.04 1.40 1.66 0.67 p 0.2411 0.2970 0.1609 0.0974 0.5059 ________________________________________ Total time: 929Done in 3 s =============================================== Slice 25 : 828 voxels in-mask Testing 828 valid columns of 828 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.50 0.07 0.08 0.11 0.03 STE 0.24 0.05 0.07 0.06 0.03 t (~N) 2.06 1.37 1.13 1.71 1.05 Z 1.97 1.33 1.10 1.66 1.03 p 0.0489 0.1828 0.2696 0.0974 0.3007 ________________________________________ Total time: 828Done in 3 s =============================================== Slice 26 : 661 voxels in-mask Testing 661 valid columns of 661 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.57 0.06 0.08 0.11 0.03 STE 0.19 0.06 0.07 0.06 0.04 t (~N) 2.92 0.92 1.05 1.71 0.84 Z 2.71 0.91 1.03 1.66 0.82 p 0.0067 0.3648 0.3028 0.0974 0.4106 ________________________________________ Total time: 661Done in 2 s =============================================== Slice 27 : 521 voxels in-mask Testing 521 valid columns of 521 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.41 0.08 0.08 0.11 0.03 STE 0.21 0.06 0.07 0.06 0.03 t (~N) 1.98 1.42 1.13 1.71 1.07 Z 1.90 1.39 1.11 1.66 1.05 p 0.0570 0.1659 0.2664 0.0974 0.2940 ________________________________________ Total time: 521Done in 3 s =============================================== Slice 28 : 392 voxels in-mask Testing 392 valid columns of 392 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.16 0.07 0.10 0.11 0.01 STE 0.15 0.08 0.07 0.06 0.02 t (~N) 1.05 0.80 1.51 1.71 0.51 Z 1.03 0.79 1.47 1.66 0.50 p 0.3039 0.4306 0.1412 0.0974 0.6167 ________________________________________ Total time: 392Done in 7 s =============================================== Slice 29 : 258 voxels in-mask Testing 258 valid columns of 258 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.50 0.10 0.06 0.11 0.05 STE 0.17 0.07 0.07 0.06 0.04 t (~N) 2.93 1.41 0.84 1.71 1.22 Z 2.72 1.38 0.83 1.66 1.19 p 0.0065 0.1685 0.4082 0.0974 0.2337 ________________________________________ Total time: 258Done in 4 s =============================================== Slice 30 : 52 voxels in-mask Testing 52 valid columns of 52 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: No Robust: No Logistic(Y): No Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.10 0.32 0.08 0.11 0.03 STE 0.04 0.27 0.07 0.06 0.03 t (~N) 2.24 1.20 1.12 1.71 0.98 Z 2.13 1.17 1.10 1.66 0.97 p 0.0329 0.2404 0.2714 0.0974 0.3336 ________________________________________ Total time: 52Do

Step 4b: Run mediation with bootstrapping

Make yourself a cup of tea while the results are compiled as this is going to take a while.
Pre-compiled results are also available in:
'mediation_Example_Data_Wager2008_Msearch_R_XisRIFGstim_norobust'
results = mediation_brain(x,y,imgs,'names',names,'mask', mask,'boot','pvals',5, 'bootsamples', 10000, 'noverbose');
Mask: /Users/torwager/Documents/GitHub/CanlabCore/CanlabCore/canlab_canonical_brains/Canonical_brains_surfaces/gray_matter_mask.img Rank data: No Statistics. =============================================== Slice 1 : 493 voxels in-mask Testing 493 valid columns of 493 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.118800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.24 -0.16 0.16 0.12 -0.04 STE 0.16 0.07 0.09 0.08 0.04 t (~N) 1.49 -2.08 1.71 1.39 -1.11 Z 1.71 -1.92 2.02 1.62 -1.63 p 0.0873 0.0549 0.0433 0.1048 0.1024 ________________________________________ Total time: 493Done in 4801 s =============================================== Slice 2 : 715 voxels in-mask Testing 715 valid columns of 715 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.115400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.29 -0.16 0.16 0.12 -0.05 STE 0.17 0.09 0.09 0.08 0.04 t (~N) 1.77 -1.72 1.78 1.38 -1.26 Z 2.92 -1.50 2.07 1.60 -1.49 p 0.0035 0.1345 0.0383 0.1104 0.1354 ________________________________________ Total time: 715Done in 9771 s =============================================== Slice 3 : 807 voxels in-mask Testing 807 valid columns of 807 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.359600. Adding 0 samples Done in 2 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.18 -0.11 0.14 0.12 -0.02 STE 0.12 0.11 0.09 0.08 0.03 t (~N) 1.46 -0.97 1.63 1.41 -0.81 Z 1.77 -0.97 1.85 1.66 -0.66 p 0.0775 0.3312 0.0645 0.0975 0.5094 ________________________________________ Total time: 9 807Done in 29919 s =============================================== Slice 4 : 931 voxels in-mask Testing 931 valid columns of 931 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.898400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.11 -0.00 0.12 0.12 -0.00 STE 0.26 0.07 0.09 0.08 0.02 t (~N) 0.41 -0.07 1.39 1.40 -0.12 Z 0.49 -0.04 1.67 1.61 -0.08 p 0.6244 0.9683 0.0951 0.1070 0.9389 ________________________________________ Total time: 931Done in 300 s =============================================== Slice 5 : 1076 voxels in-mask Testing 1076 valid columns of 1076 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.857600. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.41 0.02 0.11 0.12 0.01 STE 0.40 0.05 0.09 0.08 0.03 t (~N) 1.03 0.30 1.30 1.39 0.19 Z 1.22 0.11 1.72 1.59 0.39 p 0.2225 0.9145 0.0846 0.1117 0.6934 ________________________________________ Total time: 1076Done in 334 s =============================================== Slice 6 : 1248 voxels in-mask Testing 1248 valid columns of 1248 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.889000. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.67 0.01 0.11 0.12 0.01 STE 0.49 0.06 0.09 0.08 0.04 t (~N) 1.36 0.17 1.22 1.38 0.19 Z 1.87 0.14 1.81 1.67 0.34 p 0.0612 0.8913 0.0708 0.0947 0.7307 ________________________________________ Total time: 1248Done in 385 s =============================================== Slice 7 : 1383 voxels in-mask Testing 1383 valid columns of 1383 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.578800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 1.38 0.01 0.09 0.12 0.03 STE 0.94 0.05 0.08 0.08 0.05 t (~N) 1.47 0.14 1.02 1.40 0.61 Z 2.78 1.06 1.03 1.65 0.93 p 0.0054 0.2894 0.3035 0.0997 0.3524 ________________________________________ Total time: 1383Done in 412 s =============================================== Slice 8 : 1547 voxels in-mask Testing 1546 valid columns of 1547 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.810000. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.90 -0.02 0.10 0.12 0.02 STE 0.65 0.08 0.09 0.08 0.04 t (~N) 1.37 -0.28 1.15 1.41 0.34 Z 3.03 -0.71 1.44 1.60 0.62 p 0.0024 0.4760 0.1493 0.1106 0.5382 ________________________________________ Total time: 1547Done in 461 s =============================================== Slice 9 : 1614 voxels in-mask Testing 1613 valid columns of 1614 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.741400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.56 -0.03 0.10 0.11 0.01 STE 0.49 0.09 0.09 0.08 0.03 t (~N) 1.15 -0.32 1.16 1.40 0.42 Z 1.59 -0.49 1.69 1.68 0.48 p 0.1126 0.6263 0.0909 0.0933 0.6304 ________________________________________ Total time: 1614Done in 470 s =============================================== Slice 10 : 1589 voxels in-mask Testing 1588 valid columns of 1589 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.738200. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.69 -0.02 0.10 0.12 0.01 STE 0.50 0.09 0.08 0.08 0.04 t (~N) 1.38 -0.24 1.21 1.40 0.37 Z 2.20 -0.67 1.52 1.64 0.62 p 0.0280 0.5021 0.1290 0.1013 0.5326 ________________________________________ Total time: 1589Done in 450 s =============================================== Slice 11 : 1515 voxels in-mask Testing 1515 valid columns of 1515 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.582000. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.35 -0.06 0.13 0.12 -0.02 STE 0.18 0.10 0.09 0.08 0.04 t (~N) 1.93 -0.61 1.42 1.41 -0.41 Z 2.93 -0.99 1.91 1.63 -0.60 p 0.0034 0.3200 0.0562 0.1030 0.5459 ________________________________________ Total time: 1515Done in 1160 s =============================================== Slice 12 : 1461 voxels in-mask Testing 1461 valid columns of 1461 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.837400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.28 -0.02 0.12 0.11 -0.01 STE 0.14 0.11 0.09 0.08 0.04 t (~N) 1.99 -0.22 1.36 1.40 -0.25 Z 2.17 -0.45 1.71 1.66 -0.38 p 0.0297 0.6497 0.0875 0.0969 0.7008 ________________________________________ Total time: 1461Done in 465 s =============================================== Slice 13 : 1451 voxels in-mask Testing 1451 valid columns of 1451 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.998800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.18 0.01 0.12 0.11 -0.00 STE 0.15 0.11 0.09 0.08 0.03 t (~N) 1.16 0.06 1.34 1.41 -0.11 Z 1.08 0.28 1.67 1.70 -0.66 p 0.2783 0.7774 0.0955 0.0896 0.5114 ________________________________________ Total time: 1451Done in 481 s =============================================== Slice 14 : 1434 voxels in-mask Testing 1434 valid columns of 1434 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.486400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 1.05 0.03 0.08 0.12 0.03 STE 0.95 0.05 0.08 0.08 0.04 t (~N) 1.10 0.55 1.04 1.39 0.77 Z 1.31 1.18 1.24 1.62 1.18 p 0.1909 0.2377 0.2138 0.1042 0.2363 ________________________________________ Total time: 1434Done in 487 s =============================================== Slice 15 : 1337 voxels in-mask Testing 1337 valid columns of 1337 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.797200. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.30 0.03 0.12 0.12 -0.00 STE 0.19 0.10 0.09 0.08 0.04 t (~N) 1.52 0.26 1.31 1.42 -0.01 Z 1.42 0.46 1.44 1.61 -0.83 p 0.1570 0.6425 0.1505 0.1067 0.4080 ________________________________________ Total time: 1337Done in 445 s =============================================== Slice 16 : 1250 voxels in-mask Testing 1250 valid columns of 1250 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.806600. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.22 0.03 0.11 0.12 0.00 STE 0.16 0.10 0.09 0.08 0.03 t (~N) 1.33 0.30 1.29 1.40 0.06 Z 1.35 0.40 1.48 1.62 0.79 p 0.1758 0.6916 0.1382 0.1042 0.4295 ________________________________________ Total time: 1250Done in 414 s =============================================== Slice 17 : 1165 voxels in-mask Testing 1165 valid columns of 1165 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.901200. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.74 0.00 0.11 0.12 0.00 STE 0.58 0.05 0.09 0.08 0.04 t (~N) 1.28 0.01 1.23 1.40 0.10 Z 1.48 0.31 1.70 1.66 0.52 p 0.1391 0.7531 0.0882 0.0979 0.6018 ________________________________________ Total time: 1165Done in 388 s =============================================== Slice 18 : 1073 voxels in-mask Testing 1073 valid columns of 1073 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.180600. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.42 0.15 0.05 0.12 0.06 STE 0.30 0.07 0.08 0.08 0.06 t (~N) 1.39 2.08 0.65 1.40 1.01 Z 1.14 1.68 0.97 1.65 1.32 p 0.2563 0.0939 0.3330 0.0998 0.1868 ________________________________________ Total time: 1073Done in 369 s =============================================== Slice 19 : 1097 voxels in-mask Testing 1097 valid columns of 1097 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.122800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.44 0.12 0.06 0.12 0.05 STE 0.27 0.06 0.08 0.08 0.04 t (~N) 1.63 2.05 0.85 1.39 1.19 Z 1.42 1.92 0.96 1.63 1.49 p 0.1557 0.0543 0.3381 0.1033 0.1372 ________________________________________ Total time: 1097Done in 368 s =============================================== Slice 20 : 1122 voxels in-mask Testing 1122 valid columns of 1122 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.260400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.39 0.12 0.07 0.12 0.05 STE 0.32 0.06 0.08 0.08 0.05 t (~N) 1.25 2.16 0.86 1.40 0.95 Z 0.89 1.83 1.02 1.64 1.07 p 0.3726 0.0669 0.3057 0.1020 0.2867 ________________________________________ Total time: 1122Done in 392 s =============================================== Slice 21 : 1091 voxels in-mask Testing 1091 valid columns of 1091 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.106400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.63 0.11 0.05 0.12 0.07 STE 0.38 0.05 0.07 0.08 0.06 t (~N) 1.68 2.21 0.64 1.41 1.21 Z 1.35 1.92 0.84 1.60 1.40 p 0.1780 0.0552 0.3991 0.1088 0.1621 ________________________________________ Total time: 1091Done in 358 s =============================================== Slice 22 : 1060 voxels in-mask Testing 1060 valid columns of 1060 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.248200. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.57 0.07 0.08 0.12 0.04 STE 0.40 0.04 0.07 0.08 0.04 t (~N) 1.43 1.70 1.03 1.40 0.95 Z 1.11 1.87 1.12 1.63 1.32 p 0.2676 0.0613 0.2643 0.1025 0.1855 ________________________________________ Total time: 1060Done in 368 s =============================================== Slice 23 : 981 voxels in-mask Testing 981 valid columns of 981 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.969400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.36 0.01 0.13 0.12 -0.01 STE 0.41 0.06 0.10 0.08 0.04 t (~N) 0.88 0.12 1.32 1.39 -0.24 Z 0.55 0.80 1.36 1.65 -1.21 p 0.5817 0.4259 0.1751 0.0991 0.2252 ________________________________________ Total time: 981Done in 330 s =============================================== Slice 24 : 929 voxels in-mask Testing 929 valid columns of 929 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.622400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.45 0.03 0.11 0.12 0.01 STE 0.42 0.04 0.08 0.08 0.03 t (~N) 1.08 0.70 1.29 1.39 0.29 Z 0.77 1.19 1.40 1.64 1.18 p 0.4433 0.2340 0.1615 0.1008 0.2400 ________________________________________ Total time: 929Done in 317 s =============================================== Slice 25 : 828 voxels in-mask Testing 828 valid columns of 828 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.316400. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.58 0.05 0.09 0.12 0.03 STE 0.37 0.05 0.09 0.08 0.04 t (~N) 1.54 1.10 0.97 1.40 0.61 Z 1.21 1.43 1.11 1.63 1.52 p 0.2266 0.1517 0.2667 0.1026 0.1273 ________________________________________ Total time: 828Done in 285 s =============================================== Slice 26 : 661 voxels in-mask Testing 661 valid columns of 661 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.606800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.64 0.05 0.09 0.12 0.02 STE 0.31 0.09 0.09 0.08 0.07 t (~N) 2.03 0.55 1.03 1.40 0.32 Z 1.81 0.68 1.28 1.59 0.92 p 0.0703 0.4954 0.1994 0.1116 0.3571 ________________________________________ Total time: 661Done in 242 s =============================================== Slice 27 : 521 voxels in-mask Testing 521 valid columns of 521 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.626200. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.46 0.03 0.09 0.12 0.03 STE 0.33 0.10 0.08 0.08 0.06 t (~N) 1.39 0.32 1.09 1.38 0.47 Z 1.69 0.85 1.22 1.69 0.97 p 0.0914 0.3968 0.2207 0.0902 0.3327 ________________________________________ Total time: 521Done in 179 s =============================================== Slice 28 : 392 voxels in-mask Testing 392 valid columns of 392 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.631600. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.18 0.04 0.10 0.12 0.01 STE 0.19 0.12 0.08 0.08 0.03 t (~N) 0.95 0.31 1.26 1.42 0.45 Z 0.96 0.60 1.52 1.60 0.81 p 0.3387 0.5509 0.1281 0.1102 0.4197 ________________________________________ Total time: 392Done in 134 s =============================================== Slice 29 : 258 voxels in-mask Testing 258 valid columns of 258 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.302800. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.48 0.08 0.07 0.12 0.05 STE 0.26 0.09 0.08 0.08 0.05 t (~N) 1.83 0.81 0.87 1.39 1.00 Z 2.88 1.40 1.04 1.66 1.44 p 0.0039 0.1615 0.2989 0.0976 0.1508 ________________________________________ Total time: 258Done in 92 s =============================================== Slice 30 : 52 voxels in-mask Testing 52 valid columns of 52 total in matrix - current: 1 The mediation output below (and in the figures) is shown for the first valid voxel in the brain. It is intended to give you an idea of what the variables and output look like so you can check 1Mediation analysis Observations: 30, Replications: 1 Predictor (X): X:RVLPFC, Outcome (Y): Y:Reappraisal_Success: Mediator (M): M:BrainMediator Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.500600. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.10 0.23 0.09 0.12 0.03 STE 0.08 0.36 0.09 0.08 0.04 t (~N) 1.33 0.64 1.01 1.38 0.78 Z 1.77 1.22 1.34 1.62 1.15 p 0.0776 0.2211 0.1799 0.1042 0.2506 ________________________________________ Total time: 52Do

Results

Here are some sample brain maps from a run with bootstrapping.
Bootstrap_results.png

Step 5: Generate a results report with figures and tables

First, change to the mediation analysis directory, if you're not there already. Then, run one of several batch results functions.
The most simple and complete way to create and publish a time- and date-stamped HTML report with figures and tables is to run "publish_mediation_report.m". NOTE: To get the report to save figures (which it should), you may have to run it from the command line rather than within this live script.
publish_mediation_report;
Creating HTML report for results in: /Users/torwager/Downloads/Test_mediation/Test_mediation
ans = '/Users/torwager/Downloads/Test_mediation/Test_mediation/published_output/mediation_brain_report_29-Oct-2021_10_01/mediation_brain_results_report.html'
Saved HTML report: /Users/torwager/Downloads/Test_mediation/Test_mediation/published_output/mediation_brain_report_29-Oct-2021_10_01/mediation_brain_results_report.html
There are various other options for viewing results as well:
You can type "help mediation_brain_results" for more information. You can also look at the code in the other scripts to see how to extract and save results, and build your own script from there.
The results report generates:
moreoutput.png
The results report contains various tables and figures, like these:
regiondetail.png
sampletable.png

Step 6: Explore output and further analysis

You can use CANlab tools or other external software to visualize and further analyze the data.
The file Statistic_image_and_region_objects.mat contains two kinds of objects for each of the three effects maps:
Help documents on https://canlab.github.io give you more information on how to work with these objects. Here are a few examples, below. In general, you can use these objects flexibly to do many kinds of display and analyses. They are set up so that you can use simple commands (methods) like plot(), montage(), table(), etc. to do sensible things with neuroimaging data.
canlab tools miro.png
Let's load the saved objects and re-create some plots of the mediation (a*b) effect:
load clusters_with_extracted_data/Statistic_image_and_region_objects.mat
% Orthogonal slices you can surf around:
orthviews(ab_obj)
Displaying image 1, 286 voxels: X-M-Y_pvals.img
ans = 1×1 cell array
{1×24 struct}
% A montage
create_figure('montage'); axis off
montage(ab_obj);
Setting up fmridisplay objects
sagittal montage: 10 voxels displayed, 276 not displayed on these slices
sagittal montage: 23 voxels displayed, 263 not displayed on these slices
sagittal montage: 19 voxels displayed, 267 not displayed on these slices
axial montage: 52 voxels displayed, 234 not displayed on these slices
axial montage: 63 voxels displayed, 223 not displayed on these slices
% A table with autolabeled regions
table(ab_obj);
Grouping contiguous voxels: 24 regions ____________________________________________________________________________________________________________________________________________ Positive Effects Region Volume XYZ maxZ modal_label_descriptions Perc_covered_by_label Atlas_regions_covered region_index ________________ ______ _________________ ________ _____________________________ _____________________ _____________________ ____________ {'V_Striatum_L'} 1768 -10 24 -5 0.11777 {'Basal_ganglia' } 59 0 6 {'Cau_R' } 1352 14 -3 23 0.099512 {'Basal_ganglia' } 40 0 10 {'Caudate_Cp_L'} 672 -21 7 23 0.16516 {'Basal_ganglia' } 60 0 11 {'Bstem_Ponscd'} 2288 -24 -28 -5 0.15072 {'Brainstem' } 17 1 5 {'Cblm_CrusI_L'} 1616 -10 -89 -18 0.085922 {'Cerebellum' } 44 0 2 {'Ctx_RSC_R' } 1056 7 -41 5 0.093823 {'Cortex_Default_ModeA' } 30 0 7 {'Ctx_PGs_L' } 2456 -38 -69 32 0.21686 {'Cortex_Default_ModeA' } 28 0 12 {'Ctx_9m_R' } 2152 0 58 32 0.17004 {'Cortex_Default_ModeA' } 55 0 13 {'Ctx_s6_8_L' } 4360 -24 21 54 0.095835 {'Cortex_Default_ModeA' } 30 1 16 {'Ctx_8Ad_R' } 928 21 31 50 0.11455 {'Cortex_Default_ModeA' } 64 0 17 {'Ctx_9p_L' } 5680 -24 41 41 0.24443 {'Cortex_Default_ModeB' } 26 1 14 {'Ctx_SFL_L' } 2432 -7 21 63 0.081996 {'Cortex_Default_ModeB' } 76 1 19 {'Ctx_PHA3_L' } 840 -34 -31 -18 0.11396 {'Cortex_Default_ModeC' } 50 0 3 {'Ctx_RSC_L' } 800 -10 -41 5 0.10868 {'Cortex_Default_ModeC' } 13 0 8 {'Ctx_TE2p_L' } 3312 -58 -41 -23 0.10566 {'Cortex_Dorsal_AttentionA' } 21 0 1 {'Ctx_7Am_R' } 1632 0 -52 68 0.13748 {'Cortex_Dorsal_AttentionB' } 25 0 20 {'Ctx_6ma_L' } 2328 -28 -3 68 0.10346 {'Cortex_Fronto_ParietalA' } 27 0 21 {'Ctx_pOFC_R' } 5528 7 21 -9 0.12122 {'Cortex_Limbic' } 24 3 4 {'Ctx_1_L' } 1200 -24 -38 77 0.073576 {'Cortex_SomatomotorA' } 25 0 22 {'Ctx_3b_R' } 1464 7 -31 77 0.082568 {'Cortex_SomatomotorA' } 22 0 23 {'Ctx_6ma_R' } 9768 14 0 63 0.11413 {'Cortex_Ventral_AttentionA'} 23 2 18 {'Ctx_p32pr_R' } 1456 10 17 45 0.12291 {'Cortex_Ventral_AttentionB'} 38 1 15 {'Ctx_LO1_R' } 1320 34 -76 14 0.10949 {'Cortex_Visual_Central' } 17 0 9 Negative Effects Region Volume XYZ maxZ modal_label_descriptions Perc_covered_by_label Atlas_regions_covered region_index ______________ ______ _________________ ________ _____________________________ _____________________ _____________________ ____________ {'Ctx_FOP5_L'} 888 -38 34 5 -0.18147 {'Cortex_Ventral_AttentionA'} 26 0 24 ____________________________________________________________________________________________________________________________________________ Regions labeled by reference atlas CANlab_2018_combined Volume: Volume of contiguous region in cubic mm. MaxZ: Signed max over p Atlas_regions_covered: Number of reference atlas regions covered at least 25% by the region. This relates to whether the region covers multiple reference atlas regions Region: Best reference atlas label, defined as reference region with highest number of in-region voxels. Regions covering >25% of >5 regions labeled as "Multiple regions" Perc_covered_by_label: Percentage of the region covered by the label. Ref_region_perc: Percentage of the label region within the target region. modal_atlas_index: Index number of label region in reference atlas all_regions_covered: All regions covered >5% in descending order of importance For example, if a region is labeled 'TE1a' and Perc_covered_by_label = 8, Ref_region_perc = 38, and Atlas_regions_covered = 17, this means that 8% of the region's voxels are labeled TE1a, which is the highest percentage among reference label regions. 38% of the region TE1a is covered by the region. However, the region covers at least 25% of 17 distinct labeled reference regions. References for atlases: Beliveau, Vincent, Claus Svarer, Vibe G. Frokjaer, Gitte M. Knudsen, Douglas N. Greve, and Patrick M. Fisher. 2015. “Functional Connectivity of the Dorsal and Median Raphe Nuclei at Rest.” NeuroImage 116 (August): 187–95. Bär, Karl-Jürgen, Feliberto de la Cruz, Andy Schumann, Stefanie Koehler, Heinrich Sauer, Hugo Critchley, and Gerd Wagner. 2016. ?Functional Connectivity and Network Analysis of Midbrain and Brainstem Nuclei.? NeuroImage 134 (July):53?63. Diedrichsen, Jörn, Joshua H. Balsters, Jonathan Flavell, Emma Cussans, and Narender Ramnani. 2009. A Probabilistic MR Atlas of the Human Cerebellum. NeuroImage 46 (1): 39?46. Fairhurst, Merle, Katja Wiech, Paul Dunckley, and Irene Tracey. 2007. ?Anticipatory Brainstem Activity Predicts Neural Processing of Pain in Humans.? Pain 128 (1-2):101?10. Fan 2016 Cerebral Cortex; doi:10.1093/cercor/bhw157 Glasser, Matthew F., Timothy S. Coalson, Emma C. Robinson, Carl D. Hacker, John Harwell, Essa Yacoub, Kamil Ugurbil, et al. 2016. A Multi-Modal Parcellation of Human Cerebral Cortex. Nature 536 (7615): 171?78. Keren, Noam I., Carl T. Lozar, Kelly C. Harris, Paul S. Morgan, and Mark A. Eckert. 2009. “In Vivo Mapping of the Human Locus Coeruleus.” NeuroImage 47 (4): 1261–67. Keuken, M. C., P-L Bazin, L. Crown, J. Hootsmans, A. Laufer, C. Müller-Axt, R. Sier, et al. 2014. “Quantifying Inter-Individual Anatomical Variability in the Subcortex Using 7 T Structural MRI.” NeuroImage 94 (July): 40–46. Krauth A, Blanc R, Poveda A, Jeanmonod D, Morel A, Székely G. (2010) A mean three-dimensional atlas of the human thalamus: generation from multiple histological data. Neuroimage. 2010 Feb 1;49(3):2053-62. Jakab A, Blanc R, Berényi EL, Székely G. (2012) Generation of Individualized Thalamus Target Maps by Using Statistical Shape Models and Thalamocortical Tractography. AJNR Am J Neuroradiol. 33: 2110-2116, doi: 10.3174/ajnr.A3140 Nash, Paul G., Vaughan G. Macefield, Iven J. Klineberg, Greg M. Murray, and Luke A. Henderson. 2009. ?Differential Activation of the Human Trigeminal Nuclear Complex by Noxious and Non-Noxious Orofacial Stimulation.? Human Brain Mapping 30 (11):3772?82. Pauli 2018 Bioarxiv: CIT168 from Human Connectome Project data Pauli, Wolfgang M., Amanda N. Nili, and J. Michael Tyszka. 2018. ?A High-Resolution Probabilistic in Vivo Atlas of Human Subcortical Brain Nuclei.? Scientific Data 5 (April): 180063. Pauli, Wolfgang M., Randall C. O?Reilly, Tal Yarkoni, and Tor D. Wager. 2016. ?Regional Specialization within the Human Striatum for Diverse Psychological Functions.? Proceedings of the National Academy of Sciences of the United States of America 113 (7): 1907?12. Sclocco, Roberta, Florian Beissner, Gaelle Desbordes, Jonathan R. Polimeni, Lawrence L. Wald, Norman W. Kettner, Jieun Kim, et al. 2016. ?Neuroimaging Brainstem Circuitry Supporting Cardiovagal Response to Pain: A Combined Heart Rate Variability/ultrahigh-Field (7 T) Functional Magnetic Resonance Imaging Study.? Philosophical Transactions. Series A, Mathematical, Physical, and Engineering Sciences 374 (2067). rsta.royalsocietypublishing.org. https://doi.org/10.1098/rsta.2015.0189. Shen, X., F. Tokoglu, X. Papademetris, and R. T. Constable. 2013. “Groupwise Whole-Brain Parcellation from Resting-State fMRI Data for Network Node Identification.” NeuroImage 82 (November): 403–15. Zambreanu, L., R. G. Wise, J. C. W. Brooks, G. D. Iannetti, and I. Tracey. 2005. ?A Role for the Brainstem in Central Sensitisation in Humans. Evidence from Functional Magnetic Resonance Imaging.? Pain 114 (3):397?407. Note: Region object r(i).title contains full list of reference atlas regions covered by each cluster. ____________________________________________________________________________________________________________________________________________
The default for the ab_obj thresholded statistic image is 0.01 uncorrected (as per the report generation script), but you can re-threshold it as you like:
disp('a*b effects thresholded at p < 0.001')
a*b effects thresholded at p < 0.001
new_thresh_ab_obj = threshold(ab_obj, 0.001, 'unc');
Image 1 15 contig. clusters, sizes 1 to 12 Positive effect: 30 voxels, min p-value: 0.00001044 Negative effect: 3 voxels, min p-value: 0.00024526
clf
montage(ab_obj);
Setting up fmridisplay objects
sagittal montage: 10 voxels displayed, 276 not displayed on these slices
sagittal montage: 23 voxels displayed, 263 not displayed on these slices
sagittal montage: 19 voxels displayed, 267 not displayed on these slices
axial montage: 52 voxels displayed, 234 not displayed on these slices
axial montage: 63 voxels displayed, 223 not displayed on these slices
Or you can generate a plot of the regions pre-thresholded with FDR:
disp('Regions with a*b effects, FDR q < 0.05 from the analysis')
montage(ab_regions_fdr, 'regioncenters', 'colormap');

Re-run mediation in a post-hoc region

Re-running mediation.m in a post-hoc ROI can help to summarize observed statistics and re-create a path diagram for an individual region.
Note: these analyses are 'circular' in the sense that they are performed on a pre-selected region from the significant map. Therefore, the map-wise results provide the assessment of significance, not these post-hoc analyses. The value of the post-hoc analyses are to show the distribution of data and plots from selected regions.
First, load the SETUP file to get the x and y variables:
load mediation_SETUP.mat
Now, pick out an individual region and save it in a new region object variable. In my test run, Region #7 was ventral striatum (this may vary on re-run, esp. because bootstrapping has a stochastic element). We can see that the region object has lots of information saved about the regions, including their mm coordinates (.XYZ_mm) and extracted data (.dat).
vstriatum = ab_regions_fdr(7)
vstriatum =
region with properties: title: 'No regions' shorttitle: 'V_Striatum_L' descrip1: 'Region: a group of voxels.' descrip2: 'Some methods: orthviews, montage, surface, extract_data, table' XYZ: [3×9 double] XYZmm: [3×9 double] val: [9×1 double] val_descrip: 'Statistic effect value (.dat) for each voxel.' Z: [0.0805 0.0776 0.0916 0.0660 0.0739 0.1070 0.1178 0.0940 0.1106] Z_descrip: 'p' threshold: [] voxSize: [3×1 double] M: [4×4 double] dim: [47 56 31] numVox: 9 numpeaks: NaN center: [27 41 11] mm_center: [-10.3125 24.0625 -4.5000] timeseries: [] contrastdata: [] dat: [30×1 double] all_data: [30×9 single] source_images: '' custom_info1: 'REMOVED: CHANGED SPACE' custom_info1_descrip: 'Mask image name for region definition' custom_info2: [] custom_info2_descrip: 'Atlas regions covered >50% by this region'
Now we'll run mediation:
[paths, stats] = mediation(SETUP.X, SETUP.Y, vstriatum.dat, 'plots', 'verbose', 'boot', 'bootsamples', 10000);
Mediation analysis Observations: 30, Replications: 1 Predictor (X): X, Outcome (Y): Y: Mediator (M): M Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: No Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.001000. Adding 0 samples Done in 0 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.39 0.26 0.01 0.12 0.10 STE 0.15 0.07 0.06 0.08 0.05 t (~N) 2.64 3.54 0.21 1.38 2.23 Z 3.60 2.40 0.22 1.68 3.34 p 0.0003 0.0165 0.8283 0.0935 0.0008 ________________________________________ Total time: 3 s
Mediation analysis has many options. We didn't use the robust regression option here, as was done in the original publication (Wager et al. 2008), so let's try it now with this regions:
[paths, stats] = mediation(SETUP.X, SETUP.Y, vstriatum.dat, 'robust', 'plots', 'verbose', 'boot', 'bootsamples', 10000);
Note: Turning off iteration limit warning for robustfit. Mediation analysis Observations: 30, Replications: 1 Predictor (X): X, Outcome (Y): Y: Mediator (M): M Covariates: No Single-level analysis. Options: Plots: Yes Bootstrap: Yes Robust: Yes Logistic(Y): No Bootstrap or sign perm samples: 10000 Bootstrapping: Min p-value is 0.005000. Adding 0 samples Done in 24 (s)
Done.
Mediation scatterplots: Replications: 1 Covariates controlled for in all regressions: 0 predictors Additional mediators controlled for in outcome predictions: 1 predictors
________________________________________ Single-level model a b c' c ab Coeff 0.36 0.29 0.01 0.11 0.10 STE 0.17 0.07 0.08 0.10 0.05 t (~N) 2.10 4.20 0.18 1.04 1.94 Z 2.71 2.74 0.10 1.33 2.69 p 0.0067 0.0062 0.9174 0.1820 0.0071 ________________________________________ Total time: 27 s
Here, these analyses show that bootstrapped OLS and robust regression perform similarly in this area. They also appear to show complete mediation, though the effect size is likely to be inflated relative to the true effect size due to voxel selection bias. To better estimate effect sizes, using cross-validation and/or out-of-sample tests are recommended.