The Neurophysiological Biomarker Toolbox (NBT)



(1) Analysing the effect of condition on EEG

Version
May 2016

Estimated time
45 minutes

Objective
You will learn how to plot EEG biomarkers and how to analyse the effect of condition on EEG. The data you will be using in this tutorial were collected during the Human Neurophysiology course 2011, where a horror movie was used to alter thoughts and feelings (see the note box for details on the protocol used).

HUM2011 experiment: horror movie for altering thoughts and feeling.

36 subjects, 2 conditions:

  1. 5 minutes eyes-closed rest (ECR1) session performed when the subjects first sat down.
  2. Amsterdam Resting-State Questionnaire to assess their thoughts and feelings during that time.
  3. 7 minutes long scene from a horror movie.
  4. other 5 minutes eyes closed rest session (HOR)
  5. Amsterdam Resting-State Questionnaire to assess their thoughts and feelings during that time.

Prerequisites
You should have finished the tutorial on how to define groups: Define groups.

Getting started
1. Download the zip-file demoSet.zip from blackboard and unzip the contents in a folder called demoSet
2. Start Matlab
3. In Matlab, go to the folder demoSet which contains the unzipped files. Make sure you are inside this folder.
4. Start NBT, by typing NBT on the Matlab command line
5. Click Biomarker Statistics | NBT Print or type nbt_Print on the command line
6. If you have not defined any groups / conditions, a window will pop up: click on Define New Group(s). Type how many groups you want to define. In this case you want to define 2 groups (ECR, HOR). You will now be asked two times to define a group using parameters in the list. Click Condition, then click Ok. Now, select the group from the list, write a name for the group and click Ok. Do this for both groups. This step is very important, since at the beginning of your analysis you need to have a clear idea on which groups you want to compare in order to answer your research questions. Of course you can always come back to this step if you want to define new groups or subgroups.
7. After having defined the conditions, the NBT Print GUI pops up (Figure below).

Visualization of biomarkers using NBT Print
Before we start analyzing the statistical differences between the two conditions, we take a look at the biomarkers of the individual conditions. To plot the biomarkers of one condition or to compare different conditions, you can use NBT Print, which is a visualization tool that plots EEG biomarkers in an intuitive way.

Each biomarker is plotted as a topoplot (short for topographic plot), which is a 2D-representation of the biomarker values plotted on top of an image of the head. It is as if you are looking down at the top of the head of a person and seeing the activity of the brain represented by a specific biomarker, averaged over a certain time period. The topographies in NBT Print show the average of all subjects for all electrodes, which means the activity is not from one subject, but from all subjects in a specific experimental condition.

On the first page of NBT Print, 5 biomarkers will be plotted: Absolute Power, Relative Power, Central Frequency, DFA and Oscillation Bursts. Each biomarker is plotted for the five classical frequency bands: Delta, Theta, Alpha, Beta and Gamma. Delta waves are very slow brain waves, whereas Gamma waves are very fast. You will thus find 25 biomarkers on every page of NBT Print, which gives you a quick overview of a few biomarkers that are used for EEG research. For the course, we are only going to work with the first page of NBT Print.

Select ECR from the list Plot biomarkers of group(s). Select Grand average from the list Plot type. We are only looking at one condition, so we will not run statistics: select No statistics from the list Select statistics test.

Now you have to specify the quality of the plots. Working with EEG data usually means working with very large datasets, which creates a trade-off between speed of analysis and plotting quality: Creating high quality plots of large datasets takes a lot of time, whereas low quality plots can be generated quite fast. For the analysis now, it is sufficient to plot in a medium quality (select Medium from the Plot quality panel).

Note: Always use images with the highest possible quality in your written reports and posters!

Now click NBT Print.

You will be asked on the command line of Matlab if you want to match the ranges of the biomarker values to those of another condition. This is to make sure that we can compare the biomarkers of condition ECR with those of HOR that you will plot later on. Type y and press Enter. Now type the number of condition HOR that shows up in the list on the command line and press Enter.

An NBT Print figure will pop up which prints the biomarkers one by one. Do not click on this figure until all the biomarkers are printed and the text on the plot shows up.

Different colors on the topoplots reflect the intensity of the activity. A colorbar to the right of each topoplot indicates which values correspond to which colors: Dark colors correspond to high activity, whereas light colors indicate lower activity. The unit of the biomarker is plotted above the colorbar.

As you can see, many biomarkers have different topographies: they all add additional information about a person's brain state. Look for biomarkers that show interesting patterns of activity.

You can save the figure by clicking File | Export Setup. In the window that appears you can select some options. Click Rendering in the left menu. Fill in 300 in the field Resolution (dpi). Now click Apply to Figure at the right top of the window. Then click Export. Give the file a name and make sure to save it as a .png instead of .fig. Then click Save. Saving the file might take 20 to 30 seconds.

Now open a new NBT Print GUI and create an NBT Print for the HOR condition. Compare the NBT Print figures of the two conditions: Which biomarkers show a different topography in the two conditions?

Statistical comparison of two conditions using NBT Print
After having compared the NBT Print figures of the two conditions, we now want to test the differences between the two groups more formally. To do that, you are going to create an NBT Print of the difference between the two conditions. The statistics will be calculated at the same time and visualized on top of the figure.

Go to Biomarker statistics | NBT Print and select both conditions from the group list. To select both conditions from the group list, first click ECR. Then press Ctrl and click HOR at the same time.

Select Grand average difference as the plot type.

Select an appropriate statistics test from the list Select statistics test. Read the text below to decide on which test you want to use for comparing two conditions.

Which test should you use for comparing two conditions or two groups?

The standard test for comparing two groups is the t-test: a paired t-test is used to compare the same group of subjects at two different time points, e.g. to test the effect of a medical treatment. An unpaired t-test (or independent samples t-test) is used to compare two groups where subject dependency is not important or not possible.

The main assumption of the t-test is that your data are normally distributed. An alternative, when normal distribution is not verified, is to use non-parametric tests such as Wilcoxon signed rank test, for paired data, or Wilcoxon rank sum for unpaired data.

Paired t-test and Wilcoxon signed rank test use the mean and median respectively of the difference of the biomarker values in the two conditions.

Unpaired t-test and Wilcoxon rank sum use the difference of the mean and median respectively of the biomarkers values in the two conditions.

  • Discuss with your neighbor which test is most appropriate for this experimental design!
  • Compare the things you selected in the NBT Print GUI with the NBT Print GUI in the next figure.

Click NBT Print.

You will be asked on the MATLAB command line which multiple comparisons correction to run. For this tutorial, we will not run multiple comparisons, so type no and press Enter.

Correcting for multiple comparisons A multiple comparisons correction is needed when many tests are performed at the same time. The statistics we are running now will test the difference between the two conditions for each biomarker for every single electrode. This means that in fact 129 different statistical tests are performed at the same time for every biomarker. If we use a significance threshold of 0.05, approximately 5% of all significant electrodes we find would be a false positive. On average, 6 or 7 electrodes would show a significant difference between the two conditions just by chance. Different methods exist that modify the significance threshold in order to correct for those false positives.

Different colors now indicate the strength and direction of the difference. The difference is computed as HOR minus ECR, which means that a positive difference (red colors) indicate higher activity for HOR, whereas a negative difference (blue colors) reflect higher activity for ECR.

The electrodes of the EEG setup are plotted on top of the topoplots as small black dots. If there is a significant difference between the two conditions for a certain electrode, a white circle will appear around that electrode. Keep in mind that individual significant electrodes have little explanatory value for underlying brain regions. Look for clusters of multiple significant electrodes that all show the same kind of activity to draw solid conclusions from the topoplots.

With a right click on an electrode you can see the name of the electrode and the p-value of the statistics test for the difference between the two conditions for that electrode.

You can further inspect the values for the two conditions for that electrode in more detail by clicking Plot electrode values. This will pop up a window with two boxplots (read more about boxplots at http://en.wikipedia.org/wiki/Box_plot). On each box, the central mark is the median, the edges of the box are the 25th and 75th percentiles, the whiskers extend to the most extreme data points not considered outliers, and outliers are plotted individually. For this plot the subjects' ID will also appear showing how single-subject values for a specific biomarker and a specific channel changed in the two conditions. If the subjects are paired, you will see a line between the same subject in both conditions. This plot can help to identify outlier subjects (if any) who could be excluded from the statistics.

To compare the topoplots of the individual groups, you can right click on an electrode and click Compare two conditions. This will pop up a window with four topoplots: one for the first condition, then one for the second condition, the difference between the two conditions and a topoplot showing the p-values of the electrodes.

After having seen these images, which biomarkers do you think show interesting differences between ECR and HOR?

(2) Statistics for all ARSQ items between two conditions

tutorial/nbtprint_effectofconditiononeeg.txt · Last modified: 2016/05/22 20:23 by Simon Houtman
The NBTwiki platform - version 2.8 - 9 May 2013
Copyright (C) 2008-2015