Ressources numériques en sciences humaines et sociales OpenEdition Nos plateformes OpenEdition Books OpenEdition Journals Hypothèses Calenda Bibliothèques OpenEdition Freemium Suivez-nous

Function for Group-Level Visualization and Analysis

The follows describes a suite of functions coded in the Matlab programming language and requiring the Matlab toolbox, EEGLAB, that facilitate the visualization, analysis and comparison of group-level grand average (GA) ERP data.

The functions can be found at:

https://github.com/blri/CREx_GroupAnalysis_v2

The CREx_Group_GroupAnalysis_v2 repository contains the following scripts:

The functions provided in the CREx_GroupAnalysis_v2 repository permit the user to carry out the following two processes:

  1. Visualization of group-level GA data with 95% confidence intervals, permutation t-test with fdr correction results, Global Field Power (GFP) and Global Map Dissimilarity (GMD) for all electrodes.
  2. To plot the GA ERP against topographies at a pre-defined time resolution.
  3. Adjustment of the T0 point of epoched data.

Here, we give an overview of the group-level visualisation tool and its use as well as the visualisation of topographies over time.

Visualization of Group-Level Grand Average data

To run this analysis the calling function is “call_CREx_GroupPlot.m”. This function allows the user to define the following as the fields of a configuration structure called GPcfg.

  • Current directory: << currdir = ’C:\current_directory\exp_results\’;
  • Condition names: << Condnom1 = {‘Cond1’,’Cond2’};
  • Condition sub-group names: << Condnom2 = {‘Group1’,’Group2’};
  • Number of subjects: << Subnum = 24;             %24 subjects
  • Number of electrodes: << Channum = 64;
  • Time window of interest (in ms): << TimeWind = [0 800];
  • Titles of the electrodes of interest (eoi): << eoi = AllChans.Chaninfo;
  • Y axis limits: << ylims = [-10 10];

Notes:

  • Whilst the condition names (GPcfg.Condnom1) need to be defined, it is not necessary to define the sub-group names (GPcfg.Condnom2). To use this tool, it is necessary to store your subject-level data for a particular condition in folders that have the corresponding condition names as the program will use the GPcfg.Condnom1 variable to locate the data for each condition. Similarly, if the user includes sub-groups names for each condition, it is necessary to have a folder for each condition whose title is the corresponding condition name (it should match GPcfg.Condnom1) and within each condition folder, folders for each sub-group with a title matching that of the sub-group name (GPcfg.Condnom2). This is crucial, as if the data is not organized in this manner, the script will not run.
  • The time window of interest (GPcfg.TimeWind) can be defined by defining the lower and upper time limits in milliseconds (ms), as in the example. If the user wishes to use the entire epoch (baseline + post-stimulus interval) the user can define the following:

GPcfg.TimeWind = ‘all’;

  • The electrodes of interest can also be defined as follows if the user is only interested in visualizing a subset of the electrodes : << eoi = {‘Cz’ ‘Fz’ ‘FCz’ ‘Pz’}

However, as the updated version of CREx_GroupPlot_v2 presents group-level GA results of all electrodes in a single figure with the 10-20 configuration for 64-electrode 10-20 system, choosing a subset is not necessary as the function will detect missing electrodes and will automatically exclude them from the visualization.

The “call_CREx_GroupPlot.m” script loads the ChanInfo.mat file but to do so, the location of this *.mat file needs to be defined in line 25 of the “call_CREx_GroupPlot.m” script.  This *.mat file gives the labels of the electrodes for a 64-channel 10-20 system.

The current version of the “call_CREx_GroupPlot.m” script calls the function, “CREx_GroupPlot_v2.m”, function and passes the configuration structure (GPcfg) to it. The function, “CREx_GroupPlot_v2.m” is a revised version of the earlier “CREx_GroupPlot.m” (also in the CREx_GroupAnalysis_v2” repository), which allows the user to visualize all channels in a single figure and to interactively select the electrode of interest to visualize it in detail. The earlier version opened a figure for each electrode, which made visualization and comparison difficult.

When the “CREx_GroupPlot_v2.m” function is called, if two experimental conditions are being compared, a permutation t-test with fdr correction between the two conditions is calculated for each electrode over the time window defined. This will reveal time points presenting a statistically significant (pperm£ 0.05) different between the two conditions. Statistically significant time points are indicated by red circles and those just falling outside of statistical significance (0.06 ³ pperm > .05) are marked in green (see figure 1). If more than two conditions are being compared, then a permutation t-test is not carried out.

The ERPs for each condition for each electrode are plotted in the 10-20 configuration for 64 electrodes and the 95% confidence intervals are also presented as well as the difference between the conditions (if two conditions are defined).

The user can explore the results interactively by clicking on the axis of an electrode of interest. A second figure will open and this figure presents GA ERP in detail plotted against the GFP of each condition and the GMD dissimilarity between the two conditions (figure 2).

Figure 1: Visualization of the GA ERPS for all 64 electrodes. The 95% confidence intervals, the difference signal and those time points presenting statistically significant differences according to a permutation test with fdr correction (pperm  0.05) are also visible. Clicking on an individual electrode axis opens a second figure showing the GA ERP data for that electrode in detail.
Figure 1: Visualization of the GA ERPS for all 64 electrodes. The 95% confidence intervals, the difference signal and those time points presenting statistically significant differences according to a permutation test with fdr correction (pperm <= 0.05) are also visible. Clicking on an individual electrode axis opens a second figure showing the GA ERP data for that electrode in detail.
Figure 2: Clicking on the axis corresponding to the Cz electrode opens a figure presenting the above data. The GA ERPs of each condition with the 95% confidence intervals and statistically significant time points (red circles) according to a permutation test with fdr correction. The GFP of each condition and the GMD between the two conditions is also plotted.
Figure 2: Clicking on the axis corresponding to the Cz electrode opens a figure presenting the above data. The GA ERPs of each condition with the 95% confidence intervals and statistically significant time points (red circles) according to a permutation test with fdr correction. The GFP of each condition and the GMD between the two conditions is also plotted.

 

In addition to presenting the GA ERP data for all conditions and electrodes, another figure presents the GFP and the GMD of each of the experimental conditions separately. You will probably notice that the GMD presented in figure 2 is different to that plotted against the GFP in figure 3. This is because, while the GMD in figure 2 is calculated between the two experimental conditions, the GMD in figure 3 is calculated between successive time points for a single condition. Thus, while the GMD in figure 2 presents topological configuration differences over time between two conditions, the GMD in figure 3 shows changes in topographical configuration over time for a single condition, and may be useful in extracting the latency of condition-dependent activity changes in a data-driven manner for a single experimental condition. The GMD values range from 0 to 2; a GMD of 0 implies that two topographies, either at a different time instant or at the same time instant but for a different condition, are exactly identical, while a GMD of 2 implies that two topographies are the same but with reversed polarity. In figure 3, we can observe a very clear instance of polarity reversal occurring for both experimental conditions around 50ms post-stimulus. This corresponds to the P50 component, which is an evoked potential to an auditory click.

Figure 3: Figure presenting the GFP and GMD for each experimental condition. In this case, the GMD is calculated between consecutive time points for an individual electrode over time.
Figure 3: Figure presenting the GFP and GMD for each experimental condition. In this case, the GMD is calculated between consecutive time points for an individual electrode over time.

Blog du Centre de Ressources pour l'Expérimentation de l'ILCB