TFCE clustering using the t-values from LME models (and how to modify the stat_fun param)

Dear all,

I’ve been analysing the MEG data from 50 participants to study the correlations between the brain oscillations in some frequency bands and their behaviour during a task. For each participant, I extracted 23 epochs of 3 seconds.

I computed the power spectrum of the epochs and for each frequency band I am predicting the MEG data (= the average power) of each sensor with an Linear Mixed Effects Models, with a formula of the following form: MEG(sensor_i) ~ 1 + variable1 + variable2 + random_effects.

My goal is to extract the t-values of the variable1 and see if there are any sensors with a significant effect between the MEG data and this variable. As I have 270 good sensors, I fitted 270 LMEs and therefore I have 270 t-values for variable1 (for each frequency band).

Now I would like ti cluster significant sensors together by taking into account the spatial locations in 3D of the sensors and their total number. I went through several MNE functions (like permutation_cluster_test, permutation_cluster_1samp_test, TFCE …) but I struggle to see if they are the right choice and how to use them with the LMEs.

Based on the data I have (I don’t have a condition or groups) and some forum messages, I was thinking of using permutation_cluster_test with X = [n participants * m trials * p sensors], and the TFCE approach.

  • Can X be an 3D matrix since I don’t have two conditions?
  • If some participants have missing trials or missing sensors, does the function can deal with NaN ?
  • how to use the stat_fun parameter: is it possible to give a function to stat_fun which will run LMEs with the permuted MEG data and other covariates per participant, and then extracting the t-values from variable1 ?

Thank you for your help and let me know if more details are needed about the analyses or the data!

Best,
Paul