= 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). {{attachment:diff_signals.gif||height="426",width="653"}} == Computing a difference == {{attachment:diff_sign_table.gif}} Using sensor recordings or constrained sources: * Non-rectified (the sign of the difference is ambiguous): * Difference of the average current density maps: avg(A) - avg(B) * Difference of the Z-score: zscore(avg(deviant)) - zscore(avg(standard)) * Rectified (removing the ambiguity of the sign): * Difference of the absolute values of the averages: abs(avg(A)) - abs(avg(B)) * Difference of the Z-score on absolute values: zscore(avg(A)) - zscore(avg(B)) * Rectified difference of the averages: (avg(A) - avg(B)) * sign(svg(B)) Using unconstrained sources (three orientations per grid point): * Difference of the absolute values of the averages: norm(avg(A)) - norm(avg(B)) * Difference of the Z-score: zscore(norm(avg(A))) - zscore(norm(avg(B))) == 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). * In Process2, drag and drop the '''non-normalized deviant average''' on the left (FilesA) and the non-normalized '''standard average''' on the right (FilesB). * Run the process "'''Difference > Difference A-B'''".<
>Select the option "'''Use absolute values'''", which will convert the unconstrained source maps (three dipoles at each cortex location) into a flat cortical map by taking the norm of the three dipole orientations before computing the difference.<
><
> {{attachment:diff_process.gif||height="311",width="478"}} * Rename the new file in "Deviant-Standard", double-click on it and explore it in time. <
><
> {{attachment:diff_contact.gif||height="307",width="638"}} * We are looking at the difference (Deviant-Standard) so positive/red regions indicate higher activity levels for the deviant beeps, and negative/blue regions higher activity for the standard beeps. * '''Before 50ms''': The motor activity in the deviant is probably due to the previous stims. * '''P50''': Maybe a stronger response in the primary auditory cortex for the standard condition. * '''MMN '''(125ms): Stronger response for the deviant (left temporal, inferior frontal). * '''150ms''': Stronger response in the auditory system for the standard condition. * '''175ms''': Stronger response in the motor regions for the standard condition (motor inihibition). * '''After 200ms''': Stronger response in the deviant condition. == 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. * In Process2, select all the '''deviant trials''' (Files A) and all the '''standard trials''' (Files B). * Run the process "'''Test > Difference of means'''", select the option "'''Arithmetic average'''". <
><
> {{attachment:diff_mean_process.gif||height="341",width="419"}} * Rename the new file in "Deviant-Standard", double-click on it to display it. The difference deviant-standard does not show anymore the early responses (P50, P100) but emphasizes the difference in the later process (MMN/P200 and P300). <
><
> {{attachment:diff_mean_ts.gif||height="164",width="608"}} <)>> <> <>