I have a rather general question regarding how to apply the spatio_temporal_cluster_test correctly and how to interprete the results of it. I am just starting in the EEG field so it might be a rather simple question for the experts here.
Here is my code:
# Concatenate the data across conditions
X = [condition_a_2D, condition_b_2D] # List of arrays, shape: (n_epochs, n_times, n_channels)
n_permutations = 1000 # Number of permutations for the permutation test
tail = 0 # Two-sided test
seed = 42
# Perform spatio-temporal clustering
F_obs, clusters, p_values, _ = spatio_temporal_cluster_test(X, n_permutations=n_permutations, tail=tail, seed=seed, adjacency=adjacency)
I have EEG data inserted for X with the dimensions 41 trials, 4401 timepoints and 64 channels. It used to be a time frequency structure with the dimensions 41, 4401, 5, 64. 5 have been the frequency bins but I averaged over them.
Now I am not sure how to correctly use the mne function. I think I also need to specify a t-test as statistics with a threshold? What condition must be put on position one and two of X? I have a control and intervention condition.
Then how to interprete the outcomes of the function?
And when I have results for one subject with the two conditions how can I analyse the two conditions over all my participants in the experiment?
For that you take the analysis to the “second level” → instead of analyzing the epochs in a participant, you average over epochs in each participant, and then analyze over participants. That is the n_epochs becomes n_participants.
thank you for your response. I am now trying to use the 1 samp test function you provided. I summarized the participants for the second level and want to calculate the difference between the two conditions resulting in a 20 participants x 64 channels x 5 frequencies x 4401 timepoints.
I get how the theory of the permutations works for 2 conditions as the input. How is it done with this one difference condition?
I meet a question about the function ‘spatio_temporal-cluster_test’. I used the EEG data, so the ‘adjacency’ was calculated by Delaunay triangulations. it means that if at least three electrodes near an electrode must satisfy clustering significance to prove that the electrode is significant? I can not find the function ‘spatio_temporal-cluster_test’ where the adjacency explain how many electrodes near an electrode must satisfy clustering significance.
I will appreciate it if you could reply me.
May I ask you a question about the function ‘spatio_temporal-cluster_test’?
I want to know where the adjacency explain how many electrodes near an electrode must satisfy clustering significance in the function ‘spatio_temporal-cluster_test’. But i can not find it from the code in ‘spatio_temporal-cluster_test’.
Thank you for help!
I look through this thread and conclude it in the following, are these conclusion right?
(1) In FieldTrip, it just define the minimum number of neighborhood channels (spatial dimension), without the limitation on the temporal dimension.
(2) In the assumption, any neighboring relationship (2 timepoints, or 2 channels) makes up a cluster. There was an official explanation/code to verify this idea? (I tried my best to find it, but i fail)