Two-sample ALE meta-analysis

Meta-analytic projects often involve a number of common steps comparing two or more samples.

In this example, we replicate the ALE-based analyses from Enge et al.1.

A common project workflow with two meta-analytic samples involves the following:

  1. Run a within-sample meta-analysis of the first sample.

  2. Characterize/summarize the results of the first meta-analysis.

  3. Run a within-sample meta-analysis of the second sample.

  4. Characterize/summarize the results of the second meta-analysis.

  5. Compare the two samples with a subtraction analysis.

  6. Compare the two within-sample meta-analyses with a conjunction analysis.

import os

import matplotlib.pyplot as plt
from nilearn.plotting import plot_stat_map

Load Sleuth text files into Datasets

The data for this example are a subset of studies from a meta-analysis on semantic cognition in children 1. A first group of studies probed children’s semantic world knowledge (e.g., correctly naming an object after hearing its auditory description) while a second group of studies asked children to decide if two (or more) words were semantically related to one another or not.

Individual group ALEs

Computing separate ALE analyses for each group is not strictly necessary for performing the subtraction analysis but will help the experimenter to appreciate the similarities and differences between the groups.

from nimare.correct import FWECorrector
from nimare.meta.cbma import ALE

ale = ALE(null_method="approximate")
knowledge_results = ale.fit(knowledge_dset)
related_results = ale.fit(related_dset)

corr = FWECorrector(method="montecarlo", voxel_thresh=0.001, n_iters=100, n_cores=2)
knowledge_corrected_results = corr.transform(knowledge_results)
related_corrected_results = corr.transform(related_results)

fig, axes = plt.subplots(figsize=(12, 10), nrows=2)
knowledge_img = knowledge_corrected_results.get_map(
    "z_desc-size_level-cluster_corr-FWE_method-montecarlo"
)
plot_stat_map(
    knowledge_img,
    cut_coords=4,
    display_mode="z",
    title="Semantic knowledge",
    threshold=2.326,  # cluster-level p < .01, one-tailed
    cmap="RdBu_r",
    vmax=4,
    axes=axes[0],
    figure=fig,
)

related_img = related_corrected_results.get_map(
    "z_desc-size_level-cluster_corr-FWE_method-montecarlo"
)
plot_stat_map(
    related_img,
    cut_coords=4,
    display_mode="z",
    title="Semantic relatedness",
    threshold=2.326,  # cluster-level p < .01, one-tailed
    cmap="RdBu_r",
    vmax=4,
    axes=axes[1],
    figure=fig,
)
fig.show()
08 plot cbma subtraction conjunction

Out:

  0%|          | 0/100 [00:00<?, ?it/s]
  1%|1         | 1/100 [00:00<01:00,  1.64it/s]
  3%|3         | 3/100 [00:01<00:38,  2.51it/s]
  5%|5         | 5/100 [00:01<00:31,  3.00it/s]
  7%|7         | 7/100 [00:02<00:29,  3.10it/s]
  9%|9         | 9/100 [00:02<00:27,  3.31it/s]
 11%|#1        | 11/100 [00:03<00:27,  3.28it/s]
 12%|#2        | 12/100 [00:03<00:23,  3.75it/s]
 13%|#3        | 13/100 [00:04<00:26,  3.32it/s]
 15%|#5        | 15/100 [00:04<00:25,  3.29it/s]
 16%|#6        | 16/100 [00:04<00:22,  3.73it/s]
 17%|#7        | 17/100 [00:05<00:24,  3.41it/s]
 18%|#8        | 18/100 [00:05<00:21,  3.87it/s]
 19%|#9        | 19/100 [00:05<00:25,  3.20it/s]
 20%|##        | 20/100 [00:06<00:22,  3.61it/s]
 21%|##1       | 21/100 [00:06<00:23,  3.35it/s]
 22%|##2       | 22/100 [00:06<00:20,  3.88it/s]
 23%|##3       | 23/100 [00:07<00:24,  3.10it/s]
 24%|##4       | 24/100 [00:07<00:20,  3.69it/s]
 25%|##5       | 25/100 [00:07<00:23,  3.26it/s]
 26%|##6       | 26/100 [00:07<00:18,  4.00it/s]
 27%|##7       | 27/100 [00:08<00:23,  3.04it/s]
 28%|##8       | 28/100 [00:08<00:19,  3.73it/s]
 29%|##9       | 29/100 [00:08<00:22,  3.21it/s]
 31%|###1      | 31/100 [00:09<00:21,  3.19it/s]
 32%|###2      | 32/100 [00:09<00:17,  3.83it/s]
 33%|###3      | 33/100 [00:09<00:20,  3.26it/s]
 35%|###5      | 35/100 [00:10<00:20,  3.22it/s]
 37%|###7      | 37/100 [00:11<00:18,  3.37it/s]
 39%|###9      | 39/100 [00:11<00:18,  3.30it/s]
 41%|####1     | 41/100 [00:12<00:17,  3.45it/s]
 43%|####3     | 43/100 [00:12<00:16,  3.39it/s]
 44%|####4     | 44/100 [00:13<00:14,  3.76it/s]
 45%|####5     | 45/100 [00:13<00:15,  3.45it/s]
 46%|####6     | 46/100 [00:13<00:14,  3.84it/s]
 47%|####6     | 47/100 [00:14<00:16,  3.22it/s]
 48%|####8     | 48/100 [00:14<00:14,  3.62it/s]
 49%|####9     | 49/100 [00:14<00:15,  3.35it/s]
 50%|#####     | 50/100 [00:14<00:12,  3.86it/s]
 51%|#####1    | 51/100 [00:15<00:15,  3.12it/s]
 52%|#####2    | 52/100 [00:15<00:13,  3.67it/s]
 53%|#####3    | 53/100 [00:15<00:14,  3.32it/s]
 54%|#####4    | 54/100 [00:15<00:11,  3.84it/s]
 55%|#####5    | 55/100 [00:16<00:14,  3.10it/s]
 56%|#####6    | 56/100 [00:16<00:12,  3.65it/s]
 57%|#####6    | 57/100 [00:16<00:13,  3.29it/s]
 58%|#####8    | 58/100 [00:16<00:10,  4.01it/s]
 59%|#####8    | 59/100 [00:17<00:13,  3.05it/s]
 60%|######    | 60/100 [00:17<00:10,  3.73it/s]
 61%|######1   | 61/100 [00:18<00:12,  3.20it/s]
 62%|######2   | 62/100 [00:18<00:09,  3.94it/s]
 63%|######3   | 63/100 [00:18<00:12,  3.06it/s]
 64%|######4   | 64/100 [00:18<00:09,  3.70it/s]
 65%|######5   | 65/100 [00:19<00:10,  3.27it/s]
 66%|######6   | 66/100 [00:19<00:08,  4.00it/s]
 67%|######7   | 67/100 [00:19<00:11,  3.00it/s]
 68%|######8   | 68/100 [00:19<00:08,  3.77it/s]
 69%|######9   | 69/100 [00:20<00:09,  3.20it/s]
 71%|#######1  | 71/100 [00:20<00:09,  3.20it/s]
 72%|#######2  | 72/100 [00:21<00:07,  3.81it/s]
 73%|#######3  | 73/100 [00:21<00:08,  3.29it/s]
 75%|#######5  | 75/100 [00:22<00:07,  3.27it/s]
 76%|#######6  | 76/100 [00:22<00:06,  3.81it/s]
 77%|#######7  | 77/100 [00:22<00:06,  3.31it/s]
 79%|#######9  | 79/100 [00:23<00:06,  3.23it/s]
 81%|########1 | 81/100 [00:23<00:05,  3.38it/s]
 83%|########2 | 83/100 [00:24<00:05,  3.32it/s]
 84%|########4 | 84/100 [00:24<00:04,  3.82it/s]
 85%|########5 | 85/100 [00:25<00:04,  3.39it/s]
 86%|########6 | 86/100 [00:25<00:03,  3.94it/s]
 87%|########7 | 87/100 [00:25<00:04,  3.16it/s]
 88%|########8 | 88/100 [00:25<00:03,  3.73it/s]
 89%|########9 | 89/100 [00:26<00:03,  3.28it/s]
 91%|#########1| 91/100 [00:26<00:02,  3.26it/s]
 92%|#########2| 92/100 [00:26<00:02,  3.79it/s]
 93%|#########3| 93/100 [00:27<00:02,  3.30it/s]
 94%|#########3| 94/100 [00:27<00:01,  4.02it/s]
 95%|#########5| 95/100 [00:27<00:01,  3.05it/s]
 96%|#########6| 96/100 [00:28<00:01,  3.76it/s]
 97%|#########7| 97/100 [00:28<00:00,  3.18it/s]
 99%|#########9| 99/100 [00:29<00:00,  3.18it/s]
100%|##########| 100/100 [00:29<00:00,  3.41it/s]

  0%|          | 0/100 [00:00<?, ?it/s]
  1%|1         | 1/100 [00:00<00:54,  1.81it/s]
  3%|3         | 3/100 [00:01<00:33,  2.92it/s]
  5%|5         | 5/100 [00:01<00:27,  3.47it/s]
  7%|7         | 7/100 [00:02<00:24,  3.73it/s]
  9%|9         | 9/100 [00:02<00:24,  3.66it/s]
 11%|#1        | 11/100 [00:03<00:22,  3.91it/s]
 13%|#3        | 13/100 [00:03<00:21,  4.09it/s]
 15%|#5        | 15/100 [00:04<00:21,  3.98it/s]
 16%|#6        | 16/100 [00:04<00:19,  4.27it/s]
 17%|#7        | 17/100 [00:04<00:20,  4.06it/s]
 18%|#8        | 18/100 [00:04<00:19,  4.31it/s]
 19%|#9        | 19/100 [00:04<00:19,  4.21it/s]
 20%|##        | 20/100 [00:05<00:18,  4.34it/s]
 21%|##1       | 21/100 [00:05<00:19,  3.97it/s]
 22%|##2       | 22/100 [00:05<00:19,  3.90it/s]
 23%|##3       | 23/100 [00:05<00:18,  4.19it/s]
 24%|##4       | 24/100 [00:06<00:18,  4.14it/s]
 25%|##5       | 25/100 [00:06<00:17,  4.28it/s]
 26%|##6       | 26/100 [00:06<00:17,  4.30it/s]
 27%|##7       | 27/100 [00:06<00:18,  3.94it/s]
 28%|##8       | 28/100 [00:07<00:19,  3.78it/s]
 29%|##9       | 29/100 [00:07<00:16,  4.21it/s]
 30%|###       | 30/100 [00:07<00:17,  4.02it/s]
 31%|###1      | 31/100 [00:07<00:15,  4.40it/s]
 32%|###2      | 32/100 [00:08<00:16,  4.06it/s]
 33%|###3      | 33/100 [00:08<00:16,  3.99it/s]
 34%|###4      | 34/100 [00:08<00:18,  3.66it/s]
 35%|###5      | 35/100 [00:08<00:14,  4.36it/s]
 36%|###6      | 36/100 [00:09<00:16,  3.86it/s]
 37%|###7      | 37/100 [00:09<00:13,  4.58it/s]
 38%|###8      | 38/100 [00:09<00:15,  3.88it/s]
 39%|###9      | 39/100 [00:09<00:14,  4.19it/s]
 40%|####      | 40/100 [00:10<00:16,  3.60it/s]
 42%|####2     | 42/100 [00:10<00:15,  3.85it/s]
 44%|####4     | 44/100 [00:11<00:13,  4.04it/s]
 45%|####5     | 45/100 [00:11<00:12,  4.52it/s]
 46%|####6     | 46/100 [00:11<00:15,  3.56it/s]
 48%|####8     | 48/100 [00:12<00:13,  3.85it/s]
 50%|#####     | 50/100 [00:12<00:13,  3.84it/s]
 52%|#####2    | 52/100 [00:13<00:12,  3.97it/s]
 53%|#####3    | 53/100 [00:13<00:10,  4.37it/s]
 54%|#####4    | 54/100 [00:13<00:11,  4.04it/s]
 55%|#####5    | 55/100 [00:13<00:09,  4.63it/s]
 56%|#####6    | 56/100 [00:14<00:12,  3.58it/s]
 58%|#####8    | 58/100 [00:14<00:11,  3.80it/s]
 60%|######    | 60/100 [00:15<00:09,  4.03it/s]
 62%|######2   | 62/100 [00:15<00:09,  3.84it/s]
 64%|######4   | 64/100 [00:16<00:09,  3.96it/s]
 66%|######6   | 66/100 [00:16<00:08,  4.02it/s]
 68%|######8   | 68/100 [00:17<00:07,  4.03it/s]
 70%|#######   | 70/100 [00:17<00:07,  3.85it/s]
 72%|#######2  | 72/100 [00:18<00:07,  3.97it/s]
 74%|#######4  | 74/100 [00:18<00:06,  4.00it/s]
 76%|#######6  | 76/100 [00:19<00:06,  3.99it/s]
 78%|#######8  | 78/100 [00:19<00:05,  4.02it/s]
 80%|########  | 80/100 [00:20<00:04,  4.05it/s]
 82%|########2 | 82/100 [00:20<00:04,  3.94it/s]
 84%|########4 | 84/100 [00:21<00:03,  4.06it/s]
 86%|########6 | 86/100 [00:21<00:03,  4.06it/s]
 88%|########8 | 88/100 [00:22<00:03,  3.87it/s]
 90%|######### | 90/100 [00:22<00:02,  4.01it/s]
 92%|#########2| 92/100 [00:23<00:01,  4.16it/s]
 93%|#########3| 93/100 [00:23<00:01,  4.23it/s]
 94%|#########3| 94/100 [00:23<00:01,  3.96it/s]
 95%|#########5| 95/100 [00:23<00:01,  4.36it/s]
 96%|#########6| 96/100 [00:24<00:00,  4.07it/s]
 97%|#########7| 97/100 [00:24<00:00,  4.35it/s]
 98%|#########8| 98/100 [00:24<00:00,  4.25it/s]
 99%|#########9| 99/100 [00:24<00:00,  3.92it/s]
100%|##########| 100/100 [00:25<00:00,  4.36it/s]
100%|##########| 100/100 [00:25<00:00,  3.98it/s]

Characterize the relative contributions of experiments in the ALE results

NiMARE contains two methods for this: Jackknife and FocusCounter. We will show both below, but for the sake of speed we will only apply one to each subgroup meta-analysis.

from nimare.diagnostics import FocusCounter

counter = FocusCounter(
    target_image="z_desc-size_level-cluster_corr-FWE_method-montecarlo",
    voxel_thresh=None,
)
knowledge_count_table, _ = counter.transform(knowledge_corrected_results)
knowledge_count_table.head(10)

Out:

  0%|          | 0/21 [00:00<?, ?it/s]
 10%|9         | 2/21 [00:00<00:01, 18.41it/s]
 19%|#9        | 4/21 [00:00<00:00, 18.28it/s]
 29%|##8       | 6/21 [00:00<00:00, 18.21it/s]
 38%|###8      | 8/21 [00:00<00:00, 18.04it/s]
 48%|####7     | 10/21 [00:00<00:00, 17.85it/s]
 57%|#####7    | 12/21 [00:00<00:00, 17.97it/s]
 67%|######6   | 14/21 [00:00<00:00, 18.06it/s]
 76%|#######6  | 16/21 [00:00<00:00, 18.01it/s]
 86%|########5 | 18/21 [00:00<00:00, 18.08it/s]
 95%|#########5| 20/21 [00:01<00:00, 18.14it/s]
100%|##########| 21/21 [00:01<00:00, 18.07it/s]
1 2 3 4 5 6 7
Cluster ID
Center of Mass (53, -27, 3) (36, 23, -6) (-1, 20, 46) (-6, -13, 12) (-34, 21, 0) (-43, 11, 29) (-52, -37, 4)
arnoldussen2006nc- 0 0 0 0 0 1 0
arnoldussen2006rm- 0 0 0 0 0 1 0
backes2002- 0 0 1 0 0 1 0
balsamo2002- 0 0 0 0 0 0 1
balsamo2006- 0 0 1 0 0 2 0
bauer2017- 0 1 0 1 0 0 0
berl2014- 1 1 2 1 0 2 0
brauer2007- 0 0 1 0 0 0 0
gaillard2001- 0 0 0 0 0 1 0


from nimare.diagnostics import Jackknife

jackknife = Jackknife(
    target_image="z_desc-size_level-cluster_corr-FWE_method-montecarlo",
    voxel_thresh=None,
)
related_jackknife_table, _ = jackknife.transform(related_corrected_results)
related_jackknife_table.head(10)

Out:

  0%|          | 0/16 [00:00<?, ?it/s]
  6%|6         | 1/16 [00:01<00:21,  1.42s/it]
 12%|#2        | 2/16 [00:02<00:19,  1.41s/it]
 19%|#8        | 3/16 [00:04<00:18,  1.42s/it]
 25%|##5       | 4/16 [00:05<00:17,  1.42s/it]
 31%|###1      | 5/16 [00:07<00:15,  1.43s/it]
 38%|###7      | 6/16 [00:08<00:14,  1.43s/it]
 44%|####3     | 7/16 [00:09<00:12,  1.43s/it]
 50%|#####     | 8/16 [00:11<00:11,  1.43s/it]
 56%|#####6    | 9/16 [00:12<00:09,  1.42s/it]
 62%|######2   | 10/16 [00:14<00:08,  1.42s/it]
 69%|######8   | 11/16 [00:15<00:07,  1.42s/it]
 75%|#######5  | 12/16 [00:17<00:05,  1.42s/it]
 81%|########1 | 13/16 [00:18<00:04,  1.42s/it]
 88%|########7 | 14/16 [00:19<00:02,  1.42s/it]
 94%|#########3| 15/16 [00:21<00:01,  1.43s/it]
100%|##########| 16/16 [00:22<00:00,  1.43s/it]
100%|##########| 16/16 [00:22<00:00,  1.43s/it]
1 2 3 4 5
Cluster ID
Center of Mass (36, 23, -6) (-3, 17, 51) (-11, 6, 4) (-46, 23, 9) (-56, -43, 1)
booth2001- 0.0 0.0 0.0 0.029415 0.054821
booth2003- 0.0 0.0 0.0 0.0 0.000008
booth2007- 0.021799 0.068333 0.000019 0.051598 0.000028
cao2008- 0.134026 0.06561 0.0 0.035607 0.094222
chou2006a- 0.211268 0.123099 0.0 0.000075 0.095687
chou2006b- 0.21024 0.117018 0.0 0.004724 0.117981
chou2009- 0.188491 0.1575 0.330668 0.22325 0.212472
chou2019- 0.0 0.061734 0.0 0.0 0.0
fan2020- 0.0 0.070051 0.0 0.002654 0.101595


Subtraction analysis

Typically, one would use at least 10000 iterations for a subtraction analysis. However, we have reduced this to 100 iterations for this example.

from nimare.meta.cbma import ALESubtraction

sub = ALESubtraction(n_iters=100, n_cores=1)
res_sub = sub.fit(knowledge_dset, related_dset)
img_sub = res_sub.get_map("z_desc-group1MinusGroup2")

plot_stat_map(
    img_sub,
    cut_coords=4,
    display_mode="z",
    title="Subtraction",
    cmap="RdBu_r",
    vmax=4,
)
08 plot cbma subtraction conjunction

Out:

  0%|          | 0/100 [00:00<?, ?it/s]
  2%|2         | 2/100 [00:00<00:05, 18.99it/s]
  5%|5         | 5/100 [00:00<00:04, 21.40it/s]
  8%|8         | 8/100 [00:00<00:04, 21.93it/s]
 11%|#1        | 11/100 [00:00<00:04, 22.17it/s]
 14%|#4        | 14/100 [00:00<00:03, 22.35it/s]
 17%|#7        | 17/100 [00:00<00:03, 22.48it/s]
 20%|##        | 20/100 [00:00<00:03, 22.55it/s]
 23%|##3       | 23/100 [00:01<00:03, 22.55it/s]
 26%|##6       | 26/100 [00:01<00:03, 22.61it/s]
 29%|##9       | 29/100 [00:01<00:03, 22.71it/s]
 32%|###2      | 32/100 [00:01<00:02, 22.80it/s]
 35%|###5      | 35/100 [00:01<00:02, 22.83it/s]
 38%|###8      | 38/100 [00:01<00:02, 22.94it/s]
 41%|####1     | 41/100 [00:01<00:02, 22.92it/s]
 44%|####4     | 44/100 [00:01<00:02, 22.99it/s]
 47%|####6     | 47/100 [00:02<00:02, 22.96it/s]
 50%|#####     | 50/100 [00:02<00:02, 22.78it/s]
 53%|#####3    | 53/100 [00:02<00:02, 22.79it/s]
 56%|#####6    | 56/100 [00:02<00:01, 22.86it/s]
 59%|#####8    | 59/100 [00:02<00:01, 22.79it/s]
 62%|######2   | 62/100 [00:02<00:01, 22.45it/s]
 65%|######5   | 65/100 [00:02<00:01, 22.19it/s]
 68%|######8   | 68/100 [00:03<00:01, 22.20it/s]
 71%|#######1  | 71/100 [00:03<00:01, 22.40it/s]
 74%|#######4  | 74/100 [00:03<00:01, 22.52it/s]
 77%|#######7  | 77/100 [00:03<00:01, 22.55it/s]
 80%|########  | 80/100 [00:03<00:00, 22.56it/s]
 83%|########2 | 83/100 [00:03<00:00, 22.61it/s]
 86%|########6 | 86/100 [00:03<00:00, 22.64it/s]
 89%|########9 | 89/100 [00:03<00:00, 22.60it/s]
 92%|#########2| 92/100 [00:04<00:00, 22.52it/s]
 95%|#########5| 95/100 [00:04<00:00, 22.48it/s]
 98%|#########8| 98/100 [00:04<00:00, 22.54it/s]
100%|##########| 100/100 [00:04<00:00, 22.55it/s]

  0%|          | 0/228483 [00:00<?, ?it/s]
  0%|          | 931/228483 [00:00<00:24, 9304.55it/s]
  1%|          | 1868/228483 [00:00<00:24, 9340.43it/s]
  1%|1         | 2820/228483 [00:00<00:23, 9419.89it/s]
  2%|1         | 3762/228483 [00:00<00:24, 9323.54it/s]
  2%|2         | 4695/228483 [00:00<00:24, 9275.09it/s]
  2%|2         | 5638/228483 [00:00<00:23, 9326.27it/s]
  3%|2         | 6575/228483 [00:00<00:23, 9339.21it/s]
  3%|3         | 7529/228483 [00:00<00:23, 9400.94it/s]
  4%|3         | 8470/228483 [00:00<00:23, 9336.50it/s]
  4%|4         | 9409/228483 [00:01<00:23, 9351.19it/s]
  5%|4         | 10345/228483 [00:01<00:23, 9331.43it/s]
  5%|4         | 11288/228483 [00:01<00:23, 9358.43it/s]
  5%|5         | 12224/228483 [00:01<00:23, 9334.68it/s]
  6%|5         | 13158/228483 [00:01<00:23, 9246.46it/s]
  6%|6         | 14100/228483 [00:01<00:23, 9296.04it/s]
  7%|6         | 15040/228483 [00:01<00:22, 9326.96it/s]
  7%|6         | 15973/228483 [00:01<00:22, 9309.54it/s]
  7%|7         | 16905/228483 [00:01<00:22, 9273.03it/s]
  8%|7         | 17833/228483 [00:01<00:22, 9220.88it/s]
  8%|8         | 18756/228483 [00:02<00:22, 9218.81it/s]
  9%|8         | 19694/228483 [00:02<00:22, 9265.90it/s]
  9%|9         | 20632/228483 [00:02<00:22, 9299.94it/s]
  9%|9         | 21567/228483 [00:02<00:22, 9314.52it/s]
 10%|9         | 22499/228483 [00:02<00:22, 9242.96it/s]
 10%|#         | 23424/228483 [00:02<00:22, 9229.61it/s]
 11%|#         | 24351/228483 [00:02<00:22, 9240.82it/s]
 11%|#1        | 25284/228483 [00:02<00:21, 9265.46it/s]
 11%|#1        | 26220/228483 [00:02<00:21, 9292.27it/s]
 12%|#1        | 27150/228483 [00:02<00:21, 9246.76it/s]
 12%|#2        | 28075/228483 [00:03<00:21, 9224.59it/s]
 13%|#2        | 29003/228483 [00:03<00:21, 9238.91it/s]
 13%|#3        | 29937/228483 [00:03<00:21, 9268.87it/s]
 14%|#3        | 30864/228483 [00:03<00:21, 9265.51it/s]
 14%|#3        | 31791/228483 [00:03<00:29, 6609.69it/s]
 14%|#4        | 32728/228483 [00:03<00:26, 7254.38it/s]
 15%|#4        | 33644/228483 [00:03<00:25, 7730.34it/s]
 15%|#5        | 34576/228483 [00:03<00:23, 8147.66it/s]
 16%|#5        | 35513/228483 [00:03<00:22, 8480.38it/s]
 16%|#5        | 36459/228483 [00:04<00:21, 8754.13it/s]
 16%|#6        | 37410/228483 [00:04<00:21, 8970.49it/s]
 17%|#6        | 38357/228483 [00:04<00:20, 9114.56it/s]
 17%|#7        | 39286/228483 [00:04<00:20, 9149.01it/s]
 18%|#7        | 40215/228483 [00:04<00:20, 9188.33it/s]
 18%|#8        | 41169/228483 [00:04<00:20, 9290.07it/s]
 18%|#8        | 42105/228483 [00:04<00:20, 9280.28it/s]
 19%|#8        | 43051/228483 [00:04<00:19, 9331.73it/s]
 19%|#9        | 43988/228483 [00:04<00:19, 9292.35it/s]
 20%|#9        | 44934/228483 [00:04<00:19, 9341.25it/s]
 20%|##        | 45870/228483 [00:05<00:19, 9327.03it/s]
 20%|##        | 46814/228483 [00:05<00:19, 9360.69it/s]
 21%|##        | 47751/228483 [00:05<00:19, 9342.62it/s]
 21%|##1       | 48686/228483 [00:05<00:19, 9291.30it/s]
 22%|##1       | 49633/228483 [00:05<00:19, 9342.48it/s]
 22%|##2       | 50580/228483 [00:05<00:18, 9379.08it/s]
 23%|##2       | 51532/228483 [00:05<00:18, 9418.43it/s]
 23%|##2       | 52475/228483 [00:05<00:18, 9323.57it/s]
 23%|##3       | 53432/228483 [00:05<00:18, 9395.63it/s]
 24%|##3       | 54372/228483 [00:05<00:18, 9382.03it/s]
 24%|##4       | 55322/228483 [00:06<00:18, 9415.46it/s]
 25%|##4       | 56264/228483 [00:06<00:18, 9401.50it/s]
 25%|##5       | 57227/228483 [00:06<00:18, 9467.13it/s]
 25%|##5       | 58174/228483 [00:06<00:18, 9356.63it/s]
 26%|##5       | 59110/228483 [00:06<00:18, 9350.20it/s]
 26%|##6       | 60059/228483 [00:06<00:17, 9391.76it/s]
 27%|##6       | 60999/228483 [00:06<00:17, 9328.07it/s]
 27%|##7       | 61967/228483 [00:06<00:17, 9432.38it/s]
 28%|##7       | 62911/228483 [00:06<00:17, 9405.71it/s]
 28%|##7       | 63870/228483 [00:06<00:17, 9459.74it/s]
 28%|##8       | 64817/228483 [00:07<00:17, 9453.02it/s]
 29%|##8       | 65780/228483 [00:07<00:17, 9503.36it/s]
 29%|##9       | 66731/228483 [00:07<00:17, 9486.76it/s]
 30%|##9       | 67680/228483 [00:07<00:17, 9447.85it/s]
 30%|###       | 68634/228483 [00:07<00:16, 9473.28it/s]
 30%|###       | 69584/228483 [00:07<00:16, 9479.97it/s]
 31%|###       | 70535/228483 [00:07<00:16, 9487.22it/s]
 31%|###1      | 71484/228483 [00:07<00:24, 6496.05it/s]
 32%|###1      | 72454/228483 [00:08<00:21, 7221.02it/s]
 32%|###2      | 73405/228483 [00:08<00:19, 7779.14it/s]
 33%|###2      | 74368/228483 [00:08<00:18, 8256.24it/s]
 33%|###2      | 75313/228483 [00:08<00:17, 8577.67it/s]
 33%|###3      | 76247/228483 [00:08<00:17, 8787.67it/s]
 34%|###3      | 77190/228483 [00:08<00:16, 8969.92it/s]
 34%|###4      | 78134/228483 [00:08<00:16, 9103.49it/s]
 35%|###4      | 79090/228483 [00:08<00:16, 9234.46it/s]
 35%|###5      | 80044/228483 [00:08<00:15, 9322.78it/s]
 35%|###5      | 81003/228483 [00:08<00:15, 9400.20it/s]
 36%|###5      | 81951/228483 [00:09<00:15, 9418.51it/s]
 36%|###6      | 82899/228483 [00:09<00:15, 9423.38it/s]
 37%|###6      | 83857/228483 [00:09<00:15, 9469.12it/s]
 37%|###7      | 84807/228483 [00:09<00:15, 9437.88it/s]
 38%|###7      | 85764/228483 [00:09<00:15, 9477.20it/s]
 38%|###7      | 86718/228483 [00:09<00:14, 9494.52it/s]
 38%|###8      | 87677/228483 [00:09<00:14, 9520.31it/s]
 39%|###8      | 88630/228483 [00:09<00:14, 9473.38it/s]
 39%|###9      | 89589/228483 [00:09<00:14, 9505.71it/s]
 40%|###9      | 90542/228483 [00:09<00:14, 9511.86it/s]
 40%|####      | 91494/228483 [00:10<00:14, 9480.18it/s]
 40%|####      | 92447/228483 [00:10<00:14, 9493.53it/s]
 41%|####      | 93407/228483 [00:10<00:14, 9524.90it/s]
 41%|####1     | 94367/228483 [00:10<00:14, 9545.06it/s]
 42%|####1     | 95322/228483 [00:10<00:14, 9465.79it/s]
 42%|####2     | 96269/228483 [00:10<00:13, 9452.82it/s]
 43%|####2     | 97227/228483 [00:10<00:13, 9489.20it/s]
 43%|####2     | 98193/228483 [00:10<00:13, 9538.12it/s]
 43%|####3     | 99152/228483 [00:10<00:13, 9553.58it/s]
 44%|####3     | 100108/228483 [00:10<00:13, 9476.99it/s]
 44%|####4     | 101064/228483 [00:11<00:13, 9500.62it/s]
 45%|####4     | 102015/228483 [00:11<00:13, 9497.56it/s]
 45%|####5     | 102993/228483 [00:11<00:13, 9579.33it/s]
 45%|####5     | 103952/228483 [00:11<00:13, 9440.04it/s]
 46%|####5     | 104897/228483 [00:11<00:13, 9437.39it/s]
 46%|####6     | 105868/228483 [00:11<00:12, 9517.27it/s]
 47%|####6     | 106833/228483 [00:11<00:12, 9554.25it/s]
 47%|####7     | 107789/228483 [00:11<00:12, 9420.01it/s]
 48%|####7     | 108732/228483 [00:11<00:12, 9400.81it/s]
 48%|####8     | 109689/228483 [00:11<00:12, 9449.16it/s]
 48%|####8     | 110653/228483 [00:12<00:12, 9503.57it/s]
 49%|####8     | 111613/228483 [00:12<00:12, 9531.13it/s]
 49%|####9     | 112567/228483 [00:12<00:12, 9497.58it/s]
 50%|####9     | 113517/228483 [00:12<00:12, 9470.15it/s]
 50%|#####     | 114465/228483 [00:12<00:12, 9449.48it/s]
 51%|#####     | 115426/228483 [00:12<00:11, 9497.20it/s]
 51%|#####     | 116376/228483 [00:12<00:11, 9462.94it/s]
 51%|#####1    | 117329/228483 [00:12<00:11, 9481.96it/s]
 52%|#####1    | 118278/228483 [00:12<00:11, 9470.59it/s]
 52%|#####2    | 119226/228483 [00:13<00:17, 6309.19it/s]
 53%|#####2    | 120173/228483 [00:13<00:15, 7008.17it/s]
 53%|#####3    | 121100/228483 [00:13<00:14, 7550.39it/s]
 53%|#####3    | 122041/228483 [00:13<00:13, 8024.02it/s]
 54%|#####3    | 123006/228483 [00:13<00:12, 8456.69it/s]
 54%|#####4    | 123967/228483 [00:13<00:11, 8774.14it/s]
 55%|#####4    | 124897/228483 [00:13<00:11, 8920.33it/s]
 55%|#####5    | 125839/228483 [00:13<00:11, 9062.29it/s]
 55%|#####5    | 126802/228483 [00:13<00:11, 9226.76it/s]
 56%|#####5    | 127767/228483 [00:14<00:10, 9349.52it/s]
 56%|#####6    | 128726/228483 [00:14<00:10, 9419.03it/s]
 57%|#####6    | 129682/228483 [00:14<00:10, 9459.20it/s]
 57%|#####7    | 130652/228483 [00:14<00:10, 9530.87it/s]
 58%|#####7    | 131610/228483 [00:14<00:10, 9446.06it/s]
 58%|#####8    | 132558/228483 [00:14<00:10, 9448.67it/s]
 58%|#####8    | 133506/228483 [00:14<00:10, 9414.87it/s]
 59%|#####8    | 134466/228483 [00:14<00:09, 9467.45it/s]
 59%|#####9    | 135420/228483 [00:14<00:09, 9488.62it/s]
 60%|#####9    | 136370/228483 [00:14<00:09, 9458.53it/s]
 60%|######    | 137317/228483 [00:15<00:09, 9446.93it/s]
 61%|######    | 138263/228483 [00:15<00:09, 9437.25it/s]
 61%|######    | 139227/228483 [00:15<00:09, 9496.88it/s]
 61%|######1   | 140177/228483 [00:15<00:09, 9449.45it/s]
 62%|######1   | 141132/228483 [00:15<00:09, 9477.13it/s]
 62%|######2   | 142080/228483 [00:15<00:09, 9474.78it/s]
 63%|######2   | 143036/228483 [00:15<00:08, 9499.95it/s]
 63%|######3   | 143987/228483 [00:15<00:08, 9470.06it/s]
 63%|######3   | 144935/228483 [00:15<00:08, 9470.93it/s]
 64%|######3   | 145896/228483 [00:15<00:08, 9509.75it/s]
 64%|######4   | 146848/228483 [00:16<00:08, 9485.92it/s]
 65%|######4   | 147798/228483 [00:16<00:08, 9489.96it/s]
 65%|######5   | 148756/228483 [00:16<00:08, 9516.79it/s]
 66%|######5   | 149718/228483 [00:16<00:08, 9546.21it/s]
 66%|######5   | 150673/228483 [00:16<00:08, 9438.38it/s]
 66%|######6   | 151618/228483 [00:16<00:08, 9414.15it/s]
 67%|######6   | 152560/228483 [00:16<00:08, 9404.70it/s]
 67%|######7   | 153512/228483 [00:16<00:07, 9438.72it/s]
 68%|######7   | 154464/228483 [00:16<00:07, 9462.09it/s]
 68%|######8   | 155411/228483 [00:16<00:07, 9429.60it/s]
 68%|######8   | 156355/228483 [00:17<00:07, 9405.37it/s]
 69%|######8   | 157312/228483 [00:17<00:07, 9452.09it/s]
 69%|######9   | 158269/228483 [00:17<00:07, 9486.33it/s]
 70%|######9   | 159218/228483 [00:17<00:07, 9409.33it/s]
 70%|#######   | 160160/228483 [00:17<00:07, 9388.18it/s]
 71%|#######   | 161113/228483 [00:17<00:07, 9430.08it/s]
 71%|#######   | 162066/228483 [00:17<00:07, 9459.27it/s]
 71%|#######1  | 163013/228483 [00:17<00:06, 9409.87it/s]
 72%|#######1  | 163955/228483 [00:17<00:06, 9390.37it/s]
 72%|#######2  | 164895/228483 [00:17<00:06, 9388.28it/s]
 73%|#######2  | 165843/228483 [00:18<00:06, 9413.40it/s]
 73%|#######3  | 166793/228483 [00:18<00:06, 9437.04it/s]
 73%|#######3  | 167746/228483 [00:18<00:06, 9461.34it/s]
 74%|#######3  | 168693/228483 [00:18<00:06, 9440.05it/s]
 74%|#######4  | 169638/228483 [00:18<00:06, 9361.48it/s]
 75%|#######4  | 170575/228483 [00:18<00:06, 9333.93it/s]
 75%|#######5  | 171521/228483 [00:18<00:06, 9369.29it/s]
 75%|#######5  | 172467/228483 [00:18<00:05, 9394.52it/s]
 76%|#######5  | 173411/228483 [00:18<00:05, 9406.50it/s]
 76%|#######6  | 174352/228483 [00:18<00:05, 9401.43it/s]
 77%|#######6  | 175293/228483 [00:19<00:05, 9388.24it/s]
 77%|#######7  | 176234/228483 [00:19<00:05, 9392.46it/s]
 78%|#######7  | 177176/228483 [00:19<00:05, 9398.08it/s]
 78%|#######7  | 178116/228483 [00:19<00:05, 9369.35it/s]
 78%|#######8  | 179053/228483 [00:19<00:08, 5963.34it/s]
 79%|#######8  | 179985/228483 [00:19<00:07, 6679.82it/s]
 79%|#######9  | 180922/228483 [00:19<00:06, 7308.00it/s]
 80%|#######9  | 181871/228483 [00:19<00:05, 7854.41it/s]
 80%|########  | 182817/228483 [00:20<00:05, 8276.61it/s]
 80%|########  | 183764/228483 [00:20<00:05, 8601.90it/s]
 81%|########  | 184714/228483 [00:20<00:04, 8852.89it/s]
 81%|########1 | 185664/228483 [00:20<00:04, 9035.92it/s]
 82%|########1 | 186596/228483 [00:20<00:04, 9092.76it/s]
 82%|########2 | 187526/228483 [00:20<00:04, 9152.71it/s]
 82%|########2 | 188472/228483 [00:20<00:04, 9242.10it/s]
 83%|########2 | 189420/228483 [00:20<00:04, 9311.63it/s]
 83%|########3 | 190369/228483 [00:20<00:04, 9362.83it/s]
 84%|########3 | 191311/228483 [00:20<00:03, 9357.49it/s]
 84%|########4 | 192251/228483 [00:21<00:03, 9347.66it/s]
 85%|########4 | 193189/228483 [00:21<00:03, 9354.42it/s]
 85%|########4 | 194141/228483 [00:21<00:03, 9402.96it/s]
 85%|########5 | 195083/228483 [00:21<00:03, 9341.07it/s]
 86%|########5 | 196019/228483 [00:21<00:03, 9344.64it/s]
 86%|########6 | 196974/228483 [00:21<00:03, 9405.76it/s]
 87%|########6 | 197922/228483 [00:21<00:03, 9424.63it/s]
 87%|########7 | 198865/228483 [00:21<00:03, 9388.12it/s]
 87%|########7 | 199805/228483 [00:21<00:03, 9367.87it/s]
 88%|########7 | 200750/228483 [00:21<00:02, 9392.24it/s]
 88%|########8 | 201699/228483 [00:22<00:02, 9421.30it/s]
 89%|########8 | 202642/228483 [00:22<00:02, 9414.04it/s]
 89%|########9 | 203585/228483 [00:22<00:02, 9418.34it/s]
 90%|########9 | 204529/228483 [00:22<00:02, 9423.51it/s]
 90%|########9 | 205472/228483 [00:22<00:02, 9366.19it/s]
 90%|######### | 206409/228483 [00:22<00:02, 9336.87it/s]
 91%|######### | 207354/228483 [00:22<00:02, 9369.42it/s]
 91%|#########1| 208299/228483 [00:22<00:02, 9390.60it/s]
 92%|#########1| 209239/228483 [00:22<00:02, 9372.65it/s]
 92%|#########1| 210177/228483 [00:22<00:01, 9344.90it/s]
 92%|#########2| 211119/228483 [00:23<00:01, 9364.68it/s]
 93%|#########2| 212066/228483 [00:23<00:01, 9394.58it/s]
 93%|#########3| 213011/228483 [00:23<00:01, 9410.33it/s]
 94%|#########3| 213953/228483 [00:23<00:01, 9353.68it/s]
 94%|#########4| 214889/228483 [00:23<00:01, 9352.73it/s]
 94%|#########4| 215836/228483 [00:23<00:01, 9387.12it/s]
 95%|#########4| 216775/228483 [00:23<00:01, 9375.68it/s]
 95%|#########5| 217713/228483 [00:23<00:01, 9355.53it/s]
 96%|#########5| 218649/228483 [00:23<00:01, 9338.63it/s]
 96%|#########6| 219600/228483 [00:23<00:00, 9388.29it/s]
 97%|#########6| 220539/228483 [00:24<00:00, 9364.58it/s]
 97%|#########6| 221476/228483 [00:24<00:00, 9046.91it/s]
 97%|#########7| 222421/228483 [00:24<00:00, 9163.88it/s]
 98%|#########7| 223351/228483 [00:24<00:00, 9202.79it/s]
 98%|#########8| 224286/228483 [00:24<00:00, 9244.44it/s]
 99%|#########8| 225226/228483 [00:24<00:00, 9288.11it/s]
 99%|#########8| 226173/228483 [00:24<00:00, 9341.60it/s]
 99%|#########9| 227121/228483 [00:24<00:00, 9381.06it/s]
100%|#########9| 228060/228483 [00:24<00:00, 9348.56it/s]
100%|##########| 228483/228483 [00:32<00:00, 7138.73it/s]

<nilearn.plotting.displays._slicers.ZSlicer object at 0x7f1848c01d90>

Conjunction analysis

To determine the overlap of the meta-analytic results, a conjunction image can be computed by (a) identifying voxels that were statistically significant in both individual group maps and (b) selecting, for each of these voxels, the smaller of the two group-specific z values Nichols et al.2. Since this is simple arithmetic on images, conjunction is not implemented as a separate method in NiMARE but can easily be achieved with nilearn.image.math_img().

from nilearn.image import math_img

formula = "np.where(img1 * img2 > 0, np.minimum(img1, img2), 0)"
img_conj = math_img(formula, img1=knowledge_img, img2=related_img)

plot_stat_map(
    img_conj,
    cut_coords=4,
    display_mode="z",
    title="Conjunction",
    threshold=2.326,  # cluster-level p < .01, one-tailed
    cmap="RdBu_r",
    vmax=4,
)
08 plot cbma subtraction conjunction

Out:

<nilearn.plotting.displays._slicers.ZSlicer object at 0x7f183acacfd0>

References

1(1,2)

Alexander Enge, Rasha Abdel Rahman, and Michael A Skeide. A meta-analysis of fmri studies of semantic cognition in children. NeuroImage, 241:118436, 2021. URL: https://doi.org/10.1016/j.neuroimage.2021.118436, doi:10.1016/j.neuroimage.2021.118436.

2

Thomas Nichols, Matthew Brett, Jesper Andersson, Tor Wager, and Jean-Baptiste Poline. Valid conjunction inference with the minimum statistic. Neuroimage, 25(3):653–660, 2005. URL: https://doi.org/10.1016/j.neuroimage.2004.12.005, doi:10.1016/j.neuroimage.2004.12.005.

Total running time of the script: ( 2 minutes 8.050 seconds)

Gallery generated by Sphinx-Gallery