[Mne_analysis] Permutation cluster test for repeated measures
alexandre.gramfort at inria.fr
Sat May 25 03:29:48 EDT 2019
External Email - Use Caution
sorry for the late reply. Unfortunately I don't think the current implementation
allows to have such advanced shuffling schemes to construct the permutations.
maybe someone else can help here?
On Wed, May 22, 2019 at 11:14 AM amir Djalovski <amir.djv at gmail.com> wrote:
> External Email - Use Caution
> Dear all,
> Background - I conducted an EEG hyper-scanning experiment with 3 experimental groups and two repeated measures.
> In order to examine the connectivity between the participants, I concatenated both participants' caps (31 channels each) to be one 62 channel cap.
> For each repeated task, using the function mne.connectivity.spectral_connectivity, I calculated the connectivity between the participants.
> My question - I want to run a permutation cluster test for groups (3 categorise) * repeated measures (before/after).
> I'm using the function mne.stats.permutation_cluster_test. How can I adjust the code below to run repeated measures?
> for f_idx, f_lab in enumerate(frequencies_labels):
> print(f_idx, f_lab)
> group1= vectconn[np.argwhere(grps==1), f_idx, :]
> group2= vectconn[np.argwhere(grps==2), f_idx, :]
> group3= vectconn[np.argwhere(grps==3), f_idx, :]
> Fobs, clusters, cluster_pv, H0 = mne.stats.permutation_cluster_test(X=[group1, group2, group3],
> threshold = threshold,
> n_permutations = 1024,
> seed = 42,
> step_down_p = pvalue,
> connectivity = lil_matrix(clusters),
> check_disjoint = False)
> vectconn is my data.
> The shape for each group is:
> Out: (26, 1, 961)
> Out: (27, 1, 961)
> Out: (18, 1, 961)
> Thus, for example, for the first group I have 26 couples and I have 961 (31**2 , number of between participants connectivity measures). The 1 reflects that I'm examining only one frequency. I'm running the same permutation test in a loop over alpha, beta, and gamma.
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
More information about the Mne_analysis