22007
Comment:
|
23972
|
Deletions are marked like this. | Additions are marked like this. |
Line 120: | Line 120: |
1. '''Group average''': Compute grand averages of all the subjects. 1. '''Smooth '''spatially the source maps (optional).<<BR>>You can smooth after step #4 for computing non-parametric statistics with the subject averages. For a simple group average, it is equivalent to smooth before of after computing the average. |
1. '''Group average''': Compute grand averages of all the subjects.<<BR>>Do __not__ use a weighted average: all the subjects should have the same weight in this average. 1. '''Smooth '''spatially the source maps (optional).<<BR>>You can smooth after step #3 for computing non-parametric statistics with the subject averages. For a simple group average, it is equivalent to smooth before of after computing the average. |
Line 144: | Line 144: |
1. '''Sources''': Compute source maps for each trial (constrained, no normalization). 1. '''A = B''': * Parametric or non-parametric two-sample t-test, two-tailed. * Identify correctly '''where and when''' the conditions are different (sign not meaningful). 1. '''Directionality''': Additional step to know which condition has higher values. * Compute the difference of rectified averages: |avg(Ai)|-|avg(Bi)| * Combine the significance level (t-test) with the direction (difference): [[http://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#Directionality:_Difference_of_absolute_values|See details]]. === Statistics: Group analysis, within subject === |
* '''A = B''': * Compute source maps for each trial (constrained, no normalization). * Parametric or non-parametric two-sample t-test, two-tailed.<<BR>>Identifies correctly '''where and when''' the conditions are different (sign not meaningful). * '''Directionality''': Additional step to know which condition has higher values.<<BR>>Compute the difference of rectified averages: |avg(Ai)|-|avg(Bi)|<<BR>>Combine the significance level (t-test) with the direction (difference): [[http://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#Directionality:_Difference_of_absolute_values|See details]]. * '''Power(A) = Power(B)''': Parametric <<TAG(Advanced)>> * Compute source maps for each trial (constrained, no normalization). * Parametric F-test: <<BR>>PowerA = sum(trialA,,i,,^2^)/nTrialsA, i = 1..nTrialsA<<BR>>PowerB = sum(trialB,,j,,^2^)/nTrialsB, j = 1..nTrialsB<<BR>>F(large,large) = PowerA / PowerB; * '''Power(A) = 0''': Parametric '''[???]''' <<TAG(Advanced)>> * Power(s(t)) = sum_trials (s(t)^2); * Power_baseline = mean_{t<0} (sum_trials(s_base(t)^2)); * F(large,large) = Power(s(t)) / Power_baseline; * But more popular statistic: Power(s(t) – power(baseline) / power(baseline)<<BR>>Do not have parametric statistic<<BR>> === Statistics: Group analysis, within subject [???] === |
Line 157: | Line 159: |
* '''First-level statistic''': Rectified difference of averages. <<BR>>Proceed as in ''Difference of averages: Within subjects'', but stop before the group average (after step #8). You obtain one measure '''|Ai-Bi|''' per subject, test these values against zero. | * '''First-level statistic''': Rectified difference of normalized averages. <<BR>>Proceed as in ''Difference of averages: Within subjects'', but stop before the group average (after step #8). You obtain one measure '''|Ai-Bi|''' per subject, test these values against zero. |
Line 159: | Line 161: |
* '''|A| = |B|''': Non-parametric * '''First-level statistic''': Rectified subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain two averages per subject: |Ai| and |Bi|. |
* '''|A| = |B|''': Non-parametric <<TAG(Advanced)>> * '''First-level statistic''': Rectified and normalized subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain two averages per subject: |Ai| and |Bi|. |
Line 162: | Line 164: |
=== Statistics: Group analysis, between subjects === |
* '''Power(A) = Power(B)''': Parametric <<TAG(Advanced)>> * '''First-level statistic''': Rectified and normalized subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain two averages per subject: |Ai| and |Bi|. * '''Second-level statistic''': Parametric F-test. <<BR>>PowerA = sum(Ai^2^), i=1..nA ~ Chi2(nA)<<BR>>PowerB = sum(Bi^2^), i=1..nB ~ Chi2(nB)<<BR>>F(nA,nB) = PowerA / PowerB * '''Power(A) = 0''': Parametric <<TAG(Advanced)>> * '''First-level statistic''': Rectified and normalized subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain one average per subject: |Ai|. * '''Second-level statistic''': Parametric Chi2-test. <<BR>>PowerA = sum(Ai^2^), i=1..nA ~ Chi2(nA) === Statistics: Group analysis, between subjects [???] === |
Line 165: | Line 173: |
* '''First-level statistic''': Rectified subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain one average per subject. | * '''First-level statistic''': Rectified and normalized subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain one average per subject. |
Line 167: | Line 175: |
== Unconstrained cortical sources == |
* '''Power(G1) = Power(G2)''': Parametric * '''First-level statistic''': Rectified and normalized subject averages. <<BR>>Proceed as in ''Average: Group analysis'' to obtain one average per subject: |Ai|. * '''Second-level statistic''': Parametric F-test. <<BR>>PowerG1 = sum(Ai^2^), i=1..n1 ~ Chi2(n1)<<BR>>PowerG2 = sum(Aj^2^), j=1..n2 ~ Chi2(n2)<<BR>>F(n1,n2) = PowerG1 / PowerG2 == Unconstrained cortical sources [???] == |
Line 210: | Line 221: |
* '''|A| = |B|''' | * '''|A| = |B|''': Non-parametric |
Tutorial 27: Workflows
[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]
Authors: Francois Tadel, Elizabeth Bock, Dimitrios Pantazis, Richard Leahy, Sylvain Baillet
This page provides some general recommendations for your event-related analysis. It is not directly related with the auditory dataset, but provides guidelines you should consider for any MEG/EEG experiment.
We do not provide standard analysis pipelines for resting or steady state recordings yet, but we will add a few examples soon in the section Other analysis scenarios of the tutorials page.
Contents
What is your question?
The most appropriate analysis pipeline for your data depends on the question you are trying to answer. Before defining what are the main steps of your analysis, you should be able to state clearly the question you want to answer with your recordings.
What dimension?
- MEG/EEG recordings
- Cortical sources
- Individual anatomy or template
- Constrained (one value per vertex) or unconstrained (three values per grid point)
- Full cortex or regions of interests
- Frequency or time-frequency maps
What kind of experiment?
Single subject: Contrast two experimental conditions across trials, for one single subject.
- Files A: Single trials for condition A.
- Files B: Single trials for condition B.
Group analysis, within subject: Contrast two conditions A and B measured for each subject.
- Files A: Subject-level averages for condition A (all the subjects).
- Files B: Subject-level averages for condition B (all the subjects).
Group analysis, between subjects: Contrast two groups of subjects for one condition.
- Files A: Subject-level averages for group #1 (G1).
- Files B: Subject-level averages for group #2 (G2).
What level of precision?
- Difference of averages
- Statistically significant differences between conditions or groups
What statistical test?
A = B
Tests the null hypothesis H0:(A=B) against the alternative hypothesis H1:(A≠B)
Correct detection: Identify correctly where and when the conditions are different.
- Ambiguous sign: We cannot say which condition is stronger.
Power(A) = Power(B)
Tests the null hypothesis H0:(Power(A)=Power(B)) against the alternative hypothesis H1:(Power(A)≠Power(B))
- Incorrect detection: Not sensitive to the cases where A and B have opposite signs.
Meaningful sign: We can identify correctly which condition has a stronger response.
Power(x) = |x|2, where |x| represents the modulus of the values:
- Absolute value for scalar values (recordings, constrained sources, time-frequency)
- Norm of the three orientations for unconstrained sources.
Multiple comparisons: FDR is a good choice for correcting p-values for multiple comparisons.
Design considerations
- Use within-subject designs whenever possible (i.e. collect two conditions A and B for each subject), then contrast data at the subject level before comparing data between subjects.
- Such designs are not only statistically optimal, but also ameliorate the between-subject sign ambiguities as contrasts can be constructed within each subject.
Common pre-processing pipeline
Most event-related studies can start with the pipeline we've introduced in these tutorials.
- Import the anatomy of the subject (or use a template for all the subjects).
- Access the recordings:
- Link the continuous recordings to the Brainstorm database.
- Prepare the channel file: co-register sensors and MRI, edit type and name of channels.
- Edit the event markers: fix the delays of the triggers, mark additional events.
- Pre-process the signals:
- Evaluate the quality of the recordings with a power spectral density plot (PSD).
- Apply frequency filters (low-pass, high-pass, notch).
- Identify bad channels and bad segments.
- Correct for artifacts with SSP or ICA.
- Import the recordings in the database: epochs around some markers of interest.
How many trials to include?
Single subject: Include all the good trials (unless you have a very low number of trials).
See the averaging tutorial.Group analysis: Use a similar numbers of trials for all the subjects (no need to be strictly equal), reject the subjects for which we have much less good trials.
EEG recordings
Average
- Average the epochs across acquisition runs: OK.
- Average the epochs across subjects: OK.
- Electrodes are in the same standard positions for all the subjects (e.g. 10-20).
- Never use an absolute value for averaging or contrasting sensor-level data.
Statistics: Single subject
A = B: Parametric or non-parametric t-test, independent, two-tailed.
Statistics: Group analysis, within subject
A = B
First-level statistic: For each subject, sensor average for conditions A and B.
Second-level statistic: Parametric or non-parametric t-test, paired, two-tailed.
Statistics: Group analysis, between subjects
A = B
First-level statistic: For each subject, sensor average for the conditions to test.
Second-level statistic: Parametric/non-parametric t-test, independent, two-tailed.
MEG recordings
Average
- Average the epochs within each acquisition runs: OK.
- Average across runs: Not advised because the head of the subject may move between runs.
- Average across subjects: Strongly discouraged because the shape of the heads vary but the sensors are fixed. One sensor does not correspond to the same brain region for different subjects.
- Tolerance for data exploration: Averaging across runs and subjects can be useful for identifying time points and sensors with interesting effects but should be avoided for formal analysis.
- Note for Elekta/MaxFilter users: You can align all acquisition run to a reference run, this will allow direct channel comparisons and averaging across runs. Not recommended across subjects.
- Never use an absolute value for averaging or contrasting sensor-level data.
Statistics: Single subject
A = B: Parametric or non-parametric t-test, independent, two-tailed.
Statistics: Group analysis
- Not recommended with MEG recordings: do your analysis in source space.
Constrained cortical sources
Average: Single subject
Sensor average: Compute one sensor-level average per acquisition run and per condition.
Sources: Estimate sources for each average (constrained, no normalization).
Source average: Average the source-level run averages to get one subject average.
Compute a weighted average to balance for different numbers of trials across runs.Normalize the subject min-norm averages: Z-score wrt baseline (no absolute value).
Justification: The amplitude range of current densities may vary between subjects because of anatomical or experimental differences. This normalization helps bringing the different subjects to the same range of values.Low-pass filter your evoked responses (optional).
If you filter your data, do it after the noise normalization so the variance is not underestimated.Do not rectify the cortical maps, but display them as absolute values if needed.
Average: Group analysis
Subject averages: Compute within-subject averages for all the subjects, as described above.
Rectify the cortical maps (apply an absolute value).
Justification: Cortical maps have ambiguous signs across subjects: reconstructed sources depend heavily on the orientation of true cortical sources. Given the folding patterns of individual cortical anatomies vary considerably, cortical maps have subject-specific amplitude and sign ambiguities. This is true even if a standard anatomy is used for reconstruction.Project the individual source maps on a template (only when using the individual brains).
For more details, see tutorial: Group analysis: Subject coregistration.Group average: Compute grand averages of all the subjects.
Do not use a weighted average: all the subjects should have the same weight in this average.Smooth spatially the source maps (optional).
You can smooth after step #3 for computing non-parametric statistics with the subject averages. For a simple group average, it is equivalent to smooth before of after computing the average.
Difference of averages: Within subject
Sensor average: Compute one sensor-level average per acquisition run and condition.
Sources: Estimate sources for each average (constrained, no normalization).
Source average: Average the source-level session averages to get one subject average.
Subject difference: Compute the difference between conditions for each subject #i: (Ai-Bi)
Normalize the difference: Z-score wrt baseline (no absolute value): Z(Ai-Bi)
Low-pass filter the difference (optional)
Rectify the difference (apply an absolute value): |Z(Ai-Bi)|
Project the individual difference on a template (only when using the individual brains).
Group average: Compute grand averages of all the subjects: avg(|Z(Ai-Bi)|).
Smooth spatially the source maps (optional).
Difference of averages: Between subjects
Grand averages: Compute averages for groups #1 and #2 as in Average:Group analysis.
Difference: Compute the difference between group-level averages: avg(|G1|)-avg(|G2|)
Limitations: Because we rectify the source maps before computing the difference, we lose the ability to detect the differences between equal values of opposite signs. And we cannot keep the sign because we are averaging across subjects. Therefore, many effects are not detected correctly.
Statistics: Single subject
A = B:
- Compute source maps for each trial (constrained, no normalization).
Parametric or non-parametric two-sample t-test, two-tailed.
Identifies correctly where and when the conditions are different (sign not meaningful).Directionality: Additional step to know which condition has higher values.
Compute the difference of rectified averages: |avg(Ai)|-|avg(Bi)|
Combine the significance level (t-test) with the direction (difference): See details.
Power(A) = Power(B): Parametric
Advanced- Compute source maps for each trial (constrained, no normalization).
Parametric F-test:
PowerA = sum(trialAi2)/nTrialsA, i = 1..nTrialsA
PowerB = sum(trialBj2)/nTrialsB, j = 1..nTrialsB
F(large,large) = PowerA / PowerB;
Power(A) = 0: Parametric [???]
Advanced- Power(s(t)) = sum_trials (s(t)^2);
Power_baseline = mean_{t<0} (sum_trials(s_base(t)^2));
- F(large,large) = Power(s(t)) / Power_baseline;
But more popular statistic: Power(s(t) – power(baseline) / power(baseline)
Do not have parametric statistic
Statistics: Group analysis, within subject [???]
A = B: Non-parametric
First-level statistic: Rectified difference of normalized averages.
Proceed as in Difference of averages: Within subjects, but stop before the group average (after step #8). You obtain one measure |Ai-Bi| per subject, test these values against zero.Second-level statistic: Non-parametric one-sample test, one-tailed (H0:|A-B|=0).
|A| = |B|: Non-parametric
AdvancedFirst-level statistic: Rectified and normalized subject averages.
Proceed as in Average: Group analysis to obtain two averages per subject: |Ai| and |Bi|.Second-level statistic: Non-parametric two-sample t-test, paired, two-tailed.
Power(A) = Power(B): Parametric
AdvancedFirst-level statistic: Rectified and normalized subject averages.
Proceed as in Average: Group analysis to obtain two averages per subject: |Ai| and |Bi|.Second-level statistic: Parametric F-test.
PowerA = sum(Ai2), i=1..nA ~ Chi2(nA)
PowerB = sum(Bi2), i=1..nB ~ Chi2(nB)
F(nA,nB) = PowerA / PowerB
Power(A) = 0: Parametric
AdvancedFirst-level statistic: Rectified and normalized subject averages.
Proceed as in Average: Group analysis to obtain one average per subject: |Ai|.Second-level statistic: Parametric Chi2-test.
PowerA = sum(Ai2), i=1..nA ~ Chi2(nA)
Statistics: Group analysis, between subjects [???]
|G1| = |G2|: Non-parametric
First-level statistic: Rectified and normalized subject averages.
Proceed as in Average: Group analysis to obtain one average per subject.Second-level statistic: Non-parametric two-sample t-test, independent, two-tailed.
Power(G1) = Power(G2): Parametric
First-level statistic: Rectified and normalized subject averages.
Proceed as in Average: Group analysis to obtain one average per subject: |Ai|.Second-level statistic: Parametric F-test.
PowerG1 = sum(Ai2), i=1..n1 ~ Chi2(n1)
PowerG2 = sum(Aj2), j=1..n2 ~ Chi2(n2)
F(n1,n2) = PowerG1 / PowerG2
Unconstrained cortical sources [???]
Three values for each grid point, corresponding to the three dipoles orientations (X,Y,Z).
We want only one statistic and one p-value per grid point in output.
Average: Single subject [???]
Sensor average: Compute one sensor-level average per acquisition run and per condition.
Sources: Estimate sources for each average (unconstrained, no normalization).
Source average: Average the source-level run averages to get one subject average.
Low-pass filter your evoked responses (optional).
Normalize the subject min-norm averages: Z-score wrt baseline (no absolute value).
[???] HOW TO NORMALIZE UNCONSTRAINED MAPS WRT BASELINE?
Average: Group analysis [???]
Subject averages: Compute within-subject averages for all the subjects, as described above.
Flatten the cortical map: compute the norm of the three orientations at each grid point.
Project the individual source maps on a template (only when using the individual brains).
Group average: Compute grand averages of all the subjects.
Difference of averages: Within subject [???]
Subject averages: Compute within-subject averages for conditions A and B, as described above.
Subject difference: Compute the difference between conditions for each subject (A-B).
Flatten the cortical map: compute the norm of the three orientations at each grid point.
Project the individual difference on a template.
Group average: Compute grand averages of all the subjects: average_subjects(|Ai-Bi|).
Difference of averages: Between subjects [???]
Subject averages: Compute within-subject averages for conditions A and B, as described above.
Grand averages: Compute the group-level averages for groups #1 and #2 as described in "Average: Group analysis"
Difference: Compute the difference between group-level averages: avg(|G1|)-avg(|G2|)
Limitations: Because we rectify the source maps before computing the difference, we lose the ability to detect the differences between equal values of opposite signs. And we cannot keep the sign because we are averaging across subjects. Therefore, many effects are not detected correctly.
Statistics: Single subject [???]
Sources: Compute source maps for each trial (unconstrained, no normalization)
Statistics: Compare all the trials of condition A vs all the trials of condition B.
|A| = |B|
Non-parametric tests only, independent, test norm, two-tailed.
- Indicates which condition corresponds to a stronger brain response (for a known effect).
Statistics: Group analysis, within subject [???]
|A - B| = 0 : Non-parametric
Rectified differences: Proceed as described in Difference of averages: Between subjects, but stop before the computation of the grand averages (#6) and compute a test instead.
You obtain one |Ai-Bi| value for each subject, test these values against zero.Non-parametric one-sample test, one-tailed.
- Indicates when and where there is a significant effect (but not in which direction).
|A| = |B|: Non-parametric
Subject averages: Compute within-subject averages for A and B, as described above.
You obtain two averages per subject (Ai and Bi).Non-parametric two-sample test, paired, test absolute values, two-tailed.
- Indicates which condition corresponds to a stronger brain response (for a known effect).
Statistics: Group analysis, between subjects [???]
|A| = |B|
Subject averages: Compute within-subject averages for A and B, as described above.
You obtain two averages per subject (Ai and Bi).Non-parametric two-sample test, independent, test absolute values, two-tailed.
- Indicates which condition corresponds to a stronger brain response (for a known effect).
Regions of interest (scouts) [???]
Statistics: Single subject [???]
- Even within-subject cortical maps have sign ambiguities. MEG has limited spatial resolution and sources in opposing sulcal/gyral areas are reconstructed with inverted signs (constrained orientations only). Averaging activity in cortical regions of interest (scouts) would thus lead to signal cancelation. To avoid this brainstorm uses algorithms to manipulate the sign of individual sources before averaging within a cortical region. Unfortunately, this introduces an amplitude and sign ambiguity in the time course when summarizing scout activity.
As a result, perform any interesting within-subject average/contrast before computing an average scout time series.
- Then consider as constrained or unconstrained source maps.
Statistics: Group analysis, within subject [???]
- Comparison of scout time series between subjects is tricky because there is no way to avoid sign ambiguity for different subjects. Thus there are no clear recommendations. Rectifying before comparing scout time series between subjects can be a good idea or not depending on different cases. Having a good understanding of the data (multiple inspections across channels/sources/subjects) can offer hints whether rectifying the scout time series is a good idea. Using unconstrained cortical maps to create the scout time series can ameliorate ambiguity concerns.
Time-frequency maps [???]
Average: Single subject [???]
Time-frequency maps: Compute time-frequency maps for each trial.
- Apply the default measure: magnitude for Hilbert transform, power for Morlet wavelets.
- Do not normalize the source maps: no Z-score or ERS/ERD.
- The values are all strictly positive, there is no sign ambiguity as for recordings or sources.
Average all the time-frequency maps together, for each condition separately.
- If you are averaging time-frequency maps computed on sensor-level data, the same limitations apply as for averaging sensor level data (see sections about MEG and EEG recordings above).
Average: Group analysis [???]
Subject averages: Compute within-subject averages for all the subjects, as described above.
Normalize: [???] Zscore, ERD/ERS, or FieldTrip?
Justification: The amplitude range of current densities may vary between subjects because of anatomical or experimental differences. This normalization helps bringing the different subjects to the same range of values.Group average: Compute grand averages of all the subjects.
Difference of averages [???]
Group average: Compute the averages for conditions A and B as in Average: Group analysis.
Difference: Compute the difference between group-level averages: avg(A)-avg(B).
Statistics: Single subject [???]
Time-frequency maps: Compute time-frequency maps for each trial.
- Apply the default measure: magnitude for Hilbert transform, power for Morlet wavelets.
- Do not normalize the source maps: no Z-score or ERS/ERD.
- The values are all strictly positive, there is no sign ambiguity as for recordings or sources.
Statistics: Compare all the trials of condition A vs all the trials of condition B.
A = B [???]
Parametric or non-parametric t-test, independent, two-tailed. [???]
- Indicates both where there is a significant effect and what is its direction (no sign ambiguity).
Statistics: Group analysis, within subject [???]
A = B [???]
Subject averages: Compute within-subject averages for all subjects, as described above.
Parametric or non-parametric t-test, independent, two-tailed. [???]
- Indicates both where there is a significant effect and what is its direction (no sign ambiguity).
Workflow: Current problems [TODO]
The following inconsistencies are still present in the documentation. We are actively working on these issues and will update this tutorial as soon as we found solutions.
- [Group analysis] Unconstrained sources: How to normalize wrt baseline with a Z-score?
- Zscore(A): Normalizes each orientation separately, we cannot take the norm of it after.
- Zscore(|A|): Gets rid of the signs, forbids the option of a signed test H0:(Norm(A-B)=0)
See also the tutorial: Source estimation
- We need a way to normalize across the three orientations are the same time.
- [Single subject] Unconstrained sources: How do compare two conditions with multiple trials?
- |A|-|B|: Cannot detect correctly the difference.
- |A-B|: Cannot be computed because the trials are not paired.
- We need a test for the three orientations at the same time.
- [Group analysis] Unconstrained sources:Can we use parametric tests?
- Time-frequency maps:
- Can we use parametric tests for (A-B=0) ? Does (A-B) ~ normal distribution?
- Do we need to normalize the time-frequency maps when testing across subjects?
- If yes, how to normalize the time-frequency maps? (Z-score, ERS/ERD, divide by std)