When using compute_covariance for combined M/EEG data, is it advisable to use the same method for all participants, or should I let the cross-validation procedure pick the best method for each participant?
The differences between the methods are rather subtle when you have long recordings.
I?d recommend to do at least methods=[?empirical?, ?shrunk?] or [?empirical?, ?oas?] as a quick compromise and the way to go when using maxfilter for cleaning the MEG. In most cases, the regularized one will win.
Letting the algorithm decide how to regularize is better than forcing one method to all participants and should make your data more comparable, not less comparable.
Thank you for your response, I should probably mention it is quite a long recording (~800-900 epochs) and the data is already maxfiltered (tSSS), also the participants were mostly children so noise varies over time and between participants quite a lot. Until now I have been using the shrunk method for all participants, do you think it is worth it to switch to the algorithm with the methods you mentioned? From your article(s) about the cross-validation, I gathered that shrunk and FA methods were the best to pick. I tried SC and FA on a few participants and FA seemed to do slightly better, the thing is I would need to rerun the forward and inverse model for about 100 participants. If it should increase the comparability in a meaningful way I would, of course, do it.
In fact these details matter significantly. When we conducted the research for the NIMG article on spatial whitening we did not know well the practical consequences of SSS and tSSS and did not include related tests.
The past years have thought us a few lessons, most of which are nowadays addressed in the latest MNE-Python code.
In general, once you use SSS some regularization is often needed, but, factor analysis and PCA will not work properly as regularizers. In practice, using shrunk and empirical (or ledoit wolf or OAS as alternatives to shrunk) will do the job, and they are mostly almost better than empirical, but not always. Hence my recommendation to at least run 2 options using the cross-val method.
How healthy the final results look like will depend on whether you can properly assess the numerical rank of the data, which usually is driven by the number of SSS dimensions used but can increase once the subject starts moving and or the SSS basis moves over time as in tSSS.
We therefore have now rank parameters at all stages of handling of the covariance matrix where the known rank can be passed or automated guessing can be performed.
As of MNE 0.17 ? the latest release ? we now also have the option to compute the regularized covariance in a low rank PCA space matching the apparent numerical rank. For SSS data this not only speeds up computation significantly but also gives ad-hoc good looking results in most cases.
Here is the but: Head-movement / moving SSS basis induce non-stationarity, which may induce model violations and pose a problem that?s difficult to fix practically with the given framework. The best way to track those is to use the functions for plotting the whiteninghttps://mne-tools.github.io/stable/auto_tutorials/plot_whitened.html#sphx-glr-auto-tutorials-plot-whitened-py and document the results for each subject. For tSSS, in my experience some scaling error is difficult to avoid but at least you can try to make the model violations (imperfect scaling in baseline / after baseline) look constant across subjects.
Such problems also can occur when pooling MEG data across many runs. For these cases I?d like to further explore the possibility of processing each run separately and combining the results at a statistical level after whitening and source localization.
Please let me know if this helps and don?t hesitate to let me know how things proceed.
Best,
Denis
Thank you for such a detailed explanation, I will have a closer look at the individual noise covariance matrices after I reran the script and I will keep you informed.