Averaging between subjects

Hi all,

I'm working on the analysis of MEG data. My data consists of 20 subjects. Each subject had 3 sessions with a different stimulation setting of their neuromodulator (A, B, C), during each session they underwent 22 painful stimuli during 3 different conditions (condition 1, 2, 3). Currently I averaged the 22 trials for each subject of each session and condition. I computed a head model and applied source estimation. In total this gives 9 computed averages (in sensor and source space): A.1, A.2, A.3, B.1, B.2, B.3, C.1, C.2 and C.3.

For my research question I want to compare how the response to the painful stimulus changes across the conditions 1, 2 and 3. And if this change is different when the subject had a different stimulation setting of their neuromodulator (A, B, C).

In the tutorial on workflows (27) I read that it is recommended to use a within subject design and then contrast the data at the subject level before comparing data between subjects. What exaclty is meant by this? Does this mean that it is recommended to calculate the difference between 2 conditions for each subject (e.g. between A.1 and A.2)? And that after calculating the difference in average per condition for each subject, I could calculate the average differences by taking together all subjects (giving an average difference between A.1 and A.2)?

The other option for the averaging process I'm considering feels more intuitive for me. This option is that I use the trial average of each subject (in source space and using z-score normalisation with regard to the pre-stimulus baseline). And to then calculate the average for each type of condition by taking together all subjects (e.g. average A.1). I'm aware that you need to be careful averaging between subjects, because of their different head shapes and different helmet positions. However by averaging in source space I hope to limit those inaccuracies. Are there any other disadvantages using this approach?

What do you think is the best suitable option in this case?

Thanks in advance!

Kind regards, Laurien

If I understand correctly, you are asking whether you should compute (for example of A.1 and A.2):

  1. the average across subjects of |A.1 - A.2|, or
  2. the average across subjects of |A.1| - the average across subjects of |A.2|?

The two options would allow you to observe different things.
There is a tutorial entirely dedicated to this topic:
https://neuroimage.usc.edu/brainstorm/Tutorials/Difference

If I did not understand your question correctly, could you please try to reformulate your two options as a list of bullet points or equations, so that it is clearer what is the opposition between your two pipelines.
Please specify which section of the Workflows page you refer to.

However by averaging in source space I hope to limit those inaccuracies

You are still left with the problem of the ambiguity of the sign of the source amplitudes.
You need to rectify the subject-level averages (= absolute value) and then project on an anatomy template before computing your group-level averages of statistics.

Thankyou Francois!

I had a look at the tutorial on Difference as well. In the tutorial I read about the difference between when to take the absolute value (or norm in my case, since I used unconstrained sources). However I can't find anything on when to average between subjects (except for earlier mentioned information in the Workflows tutorial, section 'What is your question?' under 'Design considerations').

I tried to write the information related to my question in more details below and used formulas.

Since I didn't have any individual MRI scans, I warped the anatomy using the default MRI and used unconstrained sources. I z-scored the source maps with regard to the pre-stimulus baseline. Let's say that I want to compare A and B, then A and B are:

  • A = Zscore(A.1), where A.1 = average source map of 22 trials of session A condition 1

  • B = Zscore(A.2), where A.2 = average source map of 22 trials of session A condition 2

Also taken into account when to calculate the norm, I now have 5 options. Expressed in the following formulas:

  1. Difference = average (norm(A - B))
  2. Difference = average (norm(A) - norm(B))
  3. Difference = norm(average(A) - average(B))
  4. Difference = norm(average(A) - norm(average (B))
  5. Difference = average(norm(A)) - average(norm(B)

From the tutorial on Difference (section Source normalization), I conclude that option 1 and option 3 would result in maps with a correct amplitude and no sign. And that option 2, 4 and 5 would result in maps with an ambiguous amplitude and a meaningful sign. My question is what is the difference between option 1 and 2. And between option 3, 4 and 5? And do you have any recommendations regarding these options?

In order to be able to visually compare the source maps, I prefer option 3, 4 or 5, since I then can see the average of A and the average of B, however I'm not sure if these maps are still reliable and if it is possible to apply any statistics to those.

If you need any more details, let me know!

1 Like

In these recommendations, I guess "average" means "group average" = "compute the mean of subject-level averages".
With warped anatomies, you can skip the "project" step and average directly the files.
But you can't skip the "norm" step, before you can average across subjects.
Therefore options 3 and 4 are not valid.

You can permute the "average" and "difference" operations, both linear.
Therefore options 2 and 5 are the same.

You are left with 1 and 2 only, which are clearly described in the Difference tutorial.
https://neuroimage.usc.edu/brainstorm/Tutorials/Difference#Unconstrained_sources

Thankyou, all is clear now!
I will go for option 5, so that I can also visually compare the group averages. I will take into account that the difference maps have a meaningful sign, but that the amplitude is ambiguous as explained in the tutorial.