Tutorial 25: Difference

[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]

Authors: Francois Tadel, Elizabeth Bock, Dimitrios Pantazis, Richard Leahy, Sylvain Baillet

In this auditory oddball experiment, we would like to test for the significant differences between the brain response to the deviant beeps and the standard beeps, time sample by time sample. Until now we have been computing measures of the brain activity in time or time-frequency domain. We were able to see clear effects or slight tendencies, but these observations were always dependent on an arbitrary amplitude threshold and the configuration of the colormap. With appropriate statistical tests, we can go beyond these empirical observations and assess what are the significant effects in a more formal way.

We are typically interested in comparing different groups of samples. We want to know what is significantly different in the brain responses between two experimental conditions or two groups of subjects. So we will be essentially computing differences, then testing if these differences are significantly different from zero.

This tutorial focuses only on the first part of this problem. Computing a difference between condition A and condition B sounds trivial, but it requires some reflexion when it comes to interpreting the sign of the subtraction of two signals oscillating around zero. We can compute the difference between two conditions in many different ways, we will try to give clear directions of the use cases of each option. The statistical significance will be discussed in the next tutorial.

Sign of the signals

First we need to define on which signals we want to compute the difference: sensor recordings, constrained sources (one signal per grid point) or unconstrained sources (three signals per grid point). For the first two we can compare directly the signals oscillating around zero or their absolute value, for unconstrained sources we have the addional option to compare the norm of the three orientations.

Using the rectified signals (absolute value) give us the an idea of the amount activity in one particular brain region, but alter the frequency information and therefore cannot be used for time-frequency or connectivity analysis. Additionally, the rectified signals are not appropriate to detect effects between different experimental conditions, as illustrated in the next section.

In general, you should not apply an absolute value explicitely to your recordings. The only application cases for rectified signals are the display of the cortical maps (and it is done on the fly) and the comparison of magnitudes between conditions (and then it is done within the process).

diff_signals.gif

Computing a difference

diff_sign_table.gif

Using sensor recordings or constrained sources:

Using unconstrained sources (three orientations per grid point):

Sources: Normalized or not

Processing current density maps or normalized source maps do not change these facts, as long as you did not rectify the signals during the computation of the Z-score.

You should be using the Z-score(minnorm) instead of Z-score(abs(minnorm))

Normalize the source maps if you are intending to compare different subjects, it will be help bringing the source maps in the same range of values.

Difference deviant-standard

Before running complicated statistical tests that will take hours of computation, you can start by checking what the difference of the average responses looks like. If in this difference you observe obvious effects that are clearly not what you are expecting, it's not worth moving forward with finer analysis: either the data is not clean enough or your initial hypothesis is wrong.

We are going to use the Process2 tab, at the bottom of the Brainstorm figure. It works exactly like the Process1 tab but with two lists of input files, referred to as FilesA (left) and FilesB (right).

Difference of means

Another process can compute the average and the difference at the same time. We are going to compute the difference of all the trials from both runs at the sensor level. This is usually not recommended because the subject might have moved between the runs. Averaging the recordings across runs is not accurate but can give a good first approximation, in order to make sure we are on the right tracks.

Parametric Student's t-test [TODO]

Using a t-test instead of the difference of the two averages, we can reproduce similar results but with a significance level attached to each value. Parametric method require the values tested to follow a Gaussian distribution. Some sets of data could be considered as Gaussian (example: screen capture of the histogram of the values recorded by one sensor at one time point), some are not (example: histogram ABS(values) at one point).

WARNING: This parametric t-test is valid only for constrained sources. In the case of unconstrained sources, the norm of the three orientations is used, which breaks the hypothesis of the tested values following a Gaussian distribution. This test is now illustrated on unconstrained sources, but this will change when we figure out the correct parametric test to apply on unconstrained sources.

FieldTrip: Non-parametric cluster-based statistic [TODO]

We have the possibility to call some of the FieldTrip functions from the Brainstorm environment. For this, you need first to install the FieldTrip toolbox on your computer and add it to your Matlab path.

For a complete description of non-parametric cluster-based statistics in FieldTrip, read the following article: Maris & Oostendveld (2007). Additional information can be found on the FieldTrip website:

Permuation-based non-parametric statistics are more flexible and do not require to do any assumption on the distribution of the data, but on the other hand they are a lot more complicated to process. Calling FieldTrip's function ft_sourcestatistics requires a lot more memory because all the data has to be loaded at once, and a lot more computation time because the same test is repeated many times.

Running this function in the same way as the parametric t-test previously (full cortex, all the trials and all the time points) would require 45000*461*361*8/1024^3 = 58 Gb of memory just to load the data. This is impossible on most computers, we have to give up at least one dimension and run the test only for one time sample or one region of interest.

FieldTrip: Process options [TODO]

Screen captures for the two processes:

Description of the process options:

The options available here match the options passed to the function ft_sourcestatistics.

Cluster correction: Define what a cluster is for the different data types (recordings, surface source maps, volume source models, scouts)

Default options:

FieldTrip: Example 1 [TODO]

We will run this FieldTrip function first on the scouts time series and then on a short time window.

FieldTrip: Example 2 [TODO]

short time window

Time-frequency files

Both ft_sourcestatistics and ft_freqstatistics are available.

Use ft_sourcestatistics if the input files contain full source maps, and ft_freqstatistics for all the other cases (scouts or sensors).

Workflow: Single subject

You want to test for one unique subject what is significantly different between two experimental conditions. You are going to compare the single trials corresponding to each condition directly.
This is the case for this tutorial dataset, we want to know what is different between the brain responses to the deviant beep and the standard beep.

Sensor recordings: Not advised for MEG with multiple runs, correct for EEG.

Constrained source maps (one value per vertex):

Unconstrainted source maps (three values per vertex):

Time-frequency maps:

Workflow: Group analysis

You have the same two conditions recorded for multiple subjects.

Sensor recordings: Strongly discouraged for MEG, correct for EEG.

Source maps (template anatomy):

Source maps (individual anatomy):

Time-frequency maps:

Convert statistic results to regular files [TODO]

Export to SPM

An alternative to running the statical tests in Brainstorm is to export all the data and compute the tests with an external program (R, Matlab, SPM, etc). Multiple menus exist to export files to external file formats (right-click on a file > File > Export to file).

Two tutorials explain to export data specifically to SPM:

On the hard drive [TODO]

Right click one of the first TF file we computed > File > View file contents.

References

Additional discussions on the forum

Delete all your experiments

Before moving to the next tutorial, delete all the statistic results you computed in this tutorial. It will make it the database structure less confusing for the following tutorials.








Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


Tutorials/Difference (last edited 2015-11-02 17:33:28 by FrancoisTadel)