# Comparing conditions

**URL:** <https://mne.discourse.group/t/comparing-conditions/64>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 29, 2008, 10:28am UTC](https://mne.discourse.group/t/comparing-conditions/64 "2008-09-29T10:28:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 10:28am UTC](https://mne.discourse.group/t/comparing-conditions/64/1 "2008-09-29T10:28:24Z")

</div>

Hi there,

I have a question regarding how best to statistically compare two  
conditions. So far I have only being comparing between 2 conditions  
using ROIs and comparing current estimates over time. However, I'd also  
like to see the difference between two conditions across the whole  
brain. I was wondering what the best approach to this was (Ideally  
ending up with a dSPM map of condition1 - conditon2).

Any help on this would be appreciated

Thanks,

Alex Clarke

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 2:45pm UTC](https://mne.discourse.group/t/comparing-conditions/64/2 "2008-09-29T14:45:05Z")

</div>

Why not first subtract one average response from the other and then  
localize?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 3:19pm UTC](https://mne.discourse.group/t/comparing-conditions/64/3 "2008-09-29T15:19:07Z")

</div>

Because you are distorting the dipolar topographies when you do a  
subtraction at the sensor level. The resulting data is likely contain  
field patterns which do not relate to the leadfields of the actual  
sources that gave rise to the data. Thus, any source reconstruction  
which relies on lead field models, i.e. minimum norm, will give spurious  
results.

-Padraig

Yury Petrov wrote:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 3:33pm UTC](https://mne.discourse.group/t/comparing-conditions/64/4 "2008-09-29T15:33:20Z")

</div>

I didn't understand Padraig's arguments. Minimum norm is a linear  
method. This means that the same as for the forward matrix the inverse  
matrix is calculated irrespective of the actual signals measured,  
except for the noise covariance term. So if you add the noise  
covariance matrices for the two conditions and feed the resulting  
"difference" covariance matrix to the inverse routine, it will only  
change the signal to noise ratios in the trivial way. But the matrix  
will remain essentially the same, and the topography of the solution  
should not be "distorted".

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 4:02pm UTC](https://mne.discourse.group/t/comparing-conditions/64/5 "2008-09-29T16:02:48Z")

</div>

Not necessarily - the sensors pick up signals from multiple  
generators following the superposition principle. This basically is  
the sum of the products leadfield L\_ij times dipole moment p\_j plus  
noise forming the magnetic induction B\_i at sensor i

B\_i = L\_ij \*p\_j + n

If you subtract two field B1 and B2 and they share a common generator  
- this one is excluded in sensor space. In theory this works  
perfectly well in absence of noise.  
Practically speaking this concept works pretty good for certain EEG  
components like the ERN which is the difference between incorrect and  
correct responses.

"Distortions" usually come from the noise term and generators not  
being active in both conditions, or differently active in both  
conditions. Additionally you have source model related distortions  
e.g. regularisation.  
So it depends mostly on your signal to noise ratio if it is wise to  
subtract fields in sensor space or not.

It also depends on how accurate you can position the MEG helmet in  
headframe coordinates across conditions, subjects, ...  
If that can not be done reliably don't even think about subtraction  
in sensor space. You just add additional variance to your data.

-Christian

> Because you are distorting the dipolar topographies when you do a  
> subtraction at the sensor level. The resulting data is likely  
> contain field patterns which do not relate to the leadfields of the  
> actual sources that gave rise to the data. Thus, any source  
> reconstruction which relies on lead field models, i.e. minimum  
> norm, will give spurious results.
> 
> -Padraig
> 
> Yury Petrov wrote:
> 
> > Why not first subtract one average response from the other and  
> > then localize?
> > 
> > > Hi there,
> > > 
> > > I have a question regarding how best to statistically compare  
> > > two conditions. So far I have only being comparing between 2  
> > > conditions using ROIs and comparing current estimates over time.  
> > > However, I'd also like to see the difference between two  
> > > conditions across the whole brain. I was wondering what the best  
> > > approach to this was (Ideally ending up with a dSPM map of  
> > > condition1 - conditon2).
> > > 
> > > Any help on this would be appreciated
> > > 
> > > Thanks,
> > > 
> > > Alex Clarke  
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > Mne\_analysis mailing list  
> > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> --  
> P?draig Kitterick  
> Graduate Student  
> Department of Psychology  
> University of York  
> Heslington  
> York YO10 5DD  
> UK
> 
> Tel: +44 (0) 1904 43 2883  
> Email: p.kitterick at psych.york.ac.uk
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)

Christian Wienbruch

University of Konstanz  
Clinical Psychology  
Fach D27  
78457 Konstanz

Christian.Wienbruch at uni-konstanz.de

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20080929/5985a7a3/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20080929/5985a7a3/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 4:09pm UTC](https://mne.discourse.group/t/comparing-conditions/64/6 "2008-09-29T16:09:56Z")

</div>

If one cannot assume similar source configurations in the two conditions  
to be compared, presuming that any noise is constant and equivalent, is  
it safe to say that subtraction would result in distorted data  
('distorted' not the best choice of words but my vocabulary has failed  
me today!), or at least data which would be difficult to interpret?

Thanks,

P.

Christian Wienbruch wrote:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 4:52pm UTC](https://mne.discourse.group/t/comparing-conditions/64/7 "2008-09-29T16:52:00Z")

</div>

Well you are right - that's what we see all the time. Even if you do  
subtraction of incorrect and correct response to get the ERN - which  
works well for a subset of EEG sensors in fronto-central locations -  
in other regions not involved in the error processing you get  
patterns difficult to interpret.

But condition comparisons or subtractions in source space must not  
necessarily be more accurate - in case of minimum norm you "smear"  
the currents following a mathematical minimization criterion - "the  
minimum norm". Who says that the brain does work that way in a  
particular task - minimizing the current. So it is difficult to say  
what works best in terms of "best physiological model".

At that point - I usually don't care that much about the "most  
accurate source localization" any more and look what is the best  
measure to differentiate (e.g. conditions, groups) - once you've  
ruled out all the trivial effects you've got a good chance to see  
correlates of physiological differences. And if you can replicate  
that I would call it "a reliable, valuable correlate", which does not  
necessarily mean "true generator". It is rather a reasonable solution  
from the infinite amount of inverse solutions, which is probably all  
what we can expect in psychophysiology anyway.

Christian

> If one cannot assume similar source configurations in the two  
> conditions to be compared, presuming that any noise is constant and  
> equivalent, is it safe to say that subtraction would result in  
> distorted data ('distorted' not the best choice of words but my  
> vocabulary has failed me today!), or at least data which would be  
> difficult to interpret?
> 
> Thanks,
> 
> P.
> 
> Christian Wienbruch wrote:
> 
> > Not necessarily - the sensors pick up signals from multiple  
> > generators following the superposition principle. This basically  
> > is the sum of the products leadfield L\_ij times dipole moment p\_j  
> > plus noise forming the magnetic induction B\_i at sensor i
> > 
> > B\_i = L\_ij \*p\_j + n
> > 
> > If you subtract two field B1 and B2 and they share a common  
> > generator - this one is excluded in sensor space. In theory this  
> > works perfectly well in absence of noise.  
> > Practically speaking this concept works pretty good for certain  
> > EEG components like the ERN which is the difference between  
> > incorrect and correct responses.
> > 
> > "Distortions" usually come from the noise term and generators not  
> > being active in both conditions, or differently active in both  
> > conditions. Additionally you have source model related distortions  
> > e.g. regularisation.  
> > So it depends mostly on your signal to noise ratio if it is wise  
> > to subtract fields in sensor space or not.
> > 
> > It also depends on how accurate you can position the MEG helmet in  
> > headframe coordinates across conditions, subjects, ...  
> > If that can not be done reliably don't even think about  
> > subtraction in sensor space. You just add additional variance to  
> > your data.
> > 
> > -Christian
> > 
> > > Because you are distorting the dipolar topographies when you do a  
> > > subtraction at the sensor level. The resulting data is likely  
> > > contain field patterns which do not relate to the leadfields of  
> > > the actual sources that gave rise to the data. Thus, any source  
> > > reconstruction which relies on lead field models, i.e. minimum  
> > > norm, will give spurious results.
> > > 
> > > -Padraig
> > > 
> > > Yury Petrov wrote:
> > > 
> > > > Why not first subtract one average response from the other and  
> > > > then localize?
> > > > 
> > > > > Hi there,
> > > > > 
> > > > > I have a question regarding how best to statistically compare  
> > > > > two conditions. So far I have only being comparing between 2  
> > > > > conditions using ROIs and comparing current estimates over  
> > > > > time. However, I'd also like to see the difference between two  
> > > > > conditions across the whole brain. I was wondering what the  
> > > > > best approach to this was (Ideally ending up with a dSPM map  
> > > > > of condition1 - conditon2).
> > > > > 
> > > > > Any help on this would be appreciated
> > > > > 
> > > > > Thanks,
> > > > > 
> > > > > Alex Clarke  
> > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > Mne\_analysis mailing list  
> > > > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > > > \<mailto:Mne\_analysis at nmr.mgh.harvard.edu\>  
> > > > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > Mne\_analysis mailing list  
> > > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > > \<mailto:Mne\_analysis at nmr.mgh.harvard.edu\>  
> > > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > 
> > > --  
> > > P?draig Kitterick  
> > > Graduate Student  
> > > Department of Psychology  
> > > University of York  
> > > Heslington  
> > > York YO10 5DD  
> > > UK
> > > 
> > > Tel: +44 (0) 1904 43 2883  
> > > Email: p.kitterick at psych.york.ac.uk  
> > > \<mailto:p.kitterick at psych.york.ac.uk\>
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > Mne\_analysis mailing list  
> > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > \<mailto:Mne\_analysis at nmr.mgh.harvard.edu\>  
> > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > Christian Wienbruch
> > 
> > University of Konstanz  
> > Clinical Psychology  
> > Fach D27  
> > 78457 Konstanz
> > 
> > Christian.Wienbruch at uni-konstanz.de  
> > \<mailto:Christian.Wienbruch at uni-konstanz.de\>
> 
> --  
> P?draig Kitterick  
> Graduate Student  
> Department of Psychology  
> University of York  
> Heslington  
> York YO10 5DD  
> UK
> 
> Tel: +44 (0) 1904 43 2883  
> Email: p.kitterick at psych.york.ac.uk

Christian Wienbruch

University of Konstanz  
Clinical Psychology  
Fach D27  
78457 Konstanz

Christian.Wienbruch at uni-konstanz.de

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20080929/efb7a4c8/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20080929/efb7a4c8/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 4:56pm UTC](https://mne.discourse.group/t/comparing-conditions/64/8 "2008-09-29T16:56:50Z")

</div>

Thanks Christian. This is really helpful. It is so challenging to fully  
understand the limitations of what one is comparing, and how all of the  
analysis steps up to that point have contributed to any effects that one  
finds...

But it wouldn't be as much fun if it was easy 😉

-Padraig

Christian Wienbruch wrote:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 29, 2008, 5:10pm UTC](https://mne.discourse.group/t/comparing-conditions/64/9 "2008-09-29T17:10:55Z")

</div>

You can ignore my comment. I was mistakenly thinking of non-linear  
dipole fits. The solution for the difference data should be identical to  
the difference between the solutions for the individual conditions as  
long as the same regularisation parameter and noise covariance matrices  
are used for both conditions so that the inverse operator is identical  
in all cases.

-P

Yury Petrov wrote:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 2, 2008, 3:49pm UTC](https://mne.discourse.group/t/comparing-conditions/64/10 "2008-10-02T15:49:47Z")

</div>

Hi Alex

For what it is worth, I thought about these kinds of questions some time ago  
and presented a talk that was supposed to open up further discussion and  
debate. The PDF of that talk is here:

[http://www.nmr.mgh.harvard.edu/~daniel/links/presentation/stats\_on\_roi.pdf](http://www.nmr.mgh.harvard.edu/~daniel/links/presentation/stats_on_roi.pdf)

It includes some basics on the mathematics and assumptions inherent in them.  
Then the talk veers into the speculative with some thoughts on newer  
possible methods for comparing conditions when you have multiple subjects  
and multiple conditions.

I am still interested in developing these questions further, so let me know  
if these ideas are helpful.

Daniel

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 2, 2008, 5:20pm UTC](https://mne.discourse.group/t/comparing-conditions/64/11 "2008-10-02T17:20:03Z")

</div>

Daniel, first of all, thanks for the great MNE review. Some typos that  
I noticed:  
page 30: remove Gaussian source distributions  
page 33: theorm -\> theorem

I find the MNE derivation based on Bayesian max-likelihood method  
(e.g. in the Inverse Problem Theory book below) both simpler and more  
satisfactory. In particular, it makes the nature of the MNE  
assumptions much more explicit.  
[http://www.ipgp.jussieu.fr/~tarantola/Files/Professional/Books/index.html](http://www.ipgp.jussieu.fr/~tarantola/Files/Professional/Books/index.html)

I don't see what's 'not cool' with subtracting dSPMs for two  
conditions. dSPM is, essentially, a singnal-to-noise ratio. Assuming  
that your noise was the same in both conditions (i.e. the same noise  
covariance matrix) we just subtract signals, right?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 6, 2008, 12:59pm UTC](https://mne.discourse.group/t/comparing-conditions/64/12 "2008-10-06T12:59:11Z")

</div>

Yury

Thank you for your comments. That textbook you mentioned looks very good.  
Thank you for the link.

On the subject of subtracting F statistics, the more I think about it, the  
more I wonder if it was premature for me to issue that blanket statement  
that such a technique does not make statistical sense. Perhaps Yury, you are  
right and we are simply looking at the difference in SNR for some cases.  
The things that worry me still are:  
- if a dipole were to rotate in a fixed position with a fixed amplitude,  
what would that do in the subtraction case?  
- when subtracting these F statistics, no account is made for temporal  
relationships. So if I take the subtraction of two different time points  
from the same source with a sinusoidal signal that are out of phase by 180  
degrees, wouldn't this seem like one time point is more "significant" than  
the other, when in fact you are looking at different phases of the same  
thing?  
- If the noise is not the same (i.e. when comparing two different sources),  
what is the meaning of the subtraction? Does it relate to significance of  
effect, or merely SNR due to anatomy/physics?

Maybe I am just too new to the field and am asking questions that have been  
well picked over already. Anyone who can see where I went astray, please  
feel free to chime in and straighten me out.

Daniel

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 6, 2008, 3:23pm UTC](https://mne.discourse.group/t/comparing-conditions/64/13 "2008-10-06T15:23:16Z")

</div>

> - if a dipole were to rotate in a fixed position with a fixed  
> amplitude, what would that do in the subtraction case?

Daniel, you are right, this difference will be lost. But to me it  
seems more reasonable to subtract electrode signals for the two  
conditions first, then localize and do the F statistics on the  
difference signal. So, for example, if a given dipole just changed its  
orientation from inward in cond 1 to outward in cond 2, and you  
subtract averaged potentials for cond 1 from cond 2, then the  
difference will be localized as twice the outward current at the  
dipole location.

> - when subtracting these F statistics, no account is made for  
> temporal relationships. So if I take the subtraction of two  
> different time points from the same source with a sinusoidal signal  
> that are out of phase by 180 degrees, wouldn't this seem like one  
> time point is more "significant" than the other, when in fact you  
> are looking at different phases of the same thing?

Are you talking about comparing steady-state recordings in frequency/  
phase domain? For regular ERPs the F statistics is calculated for each  
timepoint in the recording, right? Of course, my assumption is that  
one subtracts the conditions for the same timepoints.

> - If the noise is not the same (i.e. when comparing two different  
> sources), what is the meaning of the subtraction? Does it relate to  
> significance of effect, or merely SNR due to anatomy/physics?

You are right. However, most experiments are done by running  
interleaved conditions, each condition for 10 - 20 trials within the  
same run of 15 - 60 minutes long. So the noise covariance should be  
the same for all conditions. Also, in my (little) experience, the  
difference in noise covariance matrices between different EEG  
experiments is not that significant, given that you are using the same  
head and the same net. It is probably even less significant for MEG,  
where the electrode and magnetometer locations are fixed on the  
helmet, and the environmental noise is, generally, better controlled.  
It is important, of course, to multiply the noise covariance matrix by  
2 (or really add the two covariance matrices) when doing F statistics  
on difference signals.

Yury

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [November 21, 2008, 11:23pm UTC](https://mne.discourse.group/t/comparing-conditions/64/14 "2008-11-21T23:23:13Z")

</div>

Dear Daniel,

I was rereading your excellent dSPM intro, and have the following  
degrees of freedom (DoF) question: what is the right number of DoF for  
the noise in the F denominator? You say the number of the "baseline"  
timepoints x 3. Where does this number of baseline timepoints come  
from? Shouldn't it be just 3 (just as for the numerator), because we  
add three variances? Also, if it was really not 3, then the correct F  
value wouldn't be simply F = signal^2/noise^2 but F = signal^2 / 3 /  
noise^2 / DoF\_noise, i.e. the numerator and denominator would have to  
be normalized by their respective DoFs, right?

Thanks,  
Yury
