I’m currently working on a group-level EEG analysis using MNE-Python, and I’d like to reproduce two types of analyses shown in the attached figures.
Sensor-level topomap:
I want to plot a topomap showing (a) the mean relative power of each group (G1, G2), (b) the difference map (G2 − G1), and (c) the p-value map (similar to the example image).
I’ve been looking for a tutorial or code example that describes how to compute and visualize group-level statistical differences (e.g., using permutation tests or t-tests) and then map the p-values on the scalp topography.
Source-level ROI analysis:
The second figure shows ROI-based comparisons (e.g., power differences between cortical regions) with p-values represented by connection lines or color bars.
I’d like to know if there’s any example or tutorial in MNE that demonstrates how to:
extract ROI-wise source power,
perform group-level comparisons (G1 vs G2), and
visualize the significant ROIs or connections as in the figure.
Then for getting the mean power of each group, you can use the combine_spectrum() function (although you will need to upgrade from your MNE v1.9 to MNE v1.10).
Where all_spectrum_G1 and all_spectrum_G2 are lists containing a Spectrum object for each of your participants, you can run:
This returns a single Spectrum object for each of your groups. You’ll see also in those tutorials how you can plot a topomap with the plot_topomap() method.
(b) the difference map (G2 − G1)
Getting the difference between your groups as a Spectrum object can be done similarly with:
For example, if you had paired observations in G1 and G2, you could follow something like this example (Permutation T-test on sensor data — MNE 1.10.2 documentation).
The example uses epoched data, but you can substitute this for the difference between groups for each subject acquired using combine_spectrum and averaged over your frequency band of interest.
Then as the example shows, you can treat your p-values as evoked data and plot them as a topomap:
Thank you so much for the detailed pointers and code references you shared earlier — they were extremely helpful. And I’m really sorry for my late reply; I’ve been going through the materials you recommended.
I’ve also started exploring the MNE-Connectivity documentation and tutorials. While reviewing them, I realized that my overall understanding of connectivity analysis (concepts, assumptions, interpretation, etc.) might be insufficient.
If you happen to know any good resources — such as introductory papers, review articles, or tutorials — that explain EEG/MEG connectivity methods more comprehensively, I would greatly appreciate your recommendations.
If you happen to know any good resources — such as introductory papers, review articles, or tutorials — that explain EEG/MEG connectivity methods more comprehensively, I would greatly appreciate your recommendations.