[Mne_analysis] Permutation cluster test for repeated measures

Alexandre Gramfort alexandre.gramfort at inria.fr
Sat May 25 03:29:48 EDT 2019
Search archives:

        External Email - Use Caution        

Dear Amir,

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?

Alex

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?
>
> Code
> __________________________________________________________________
> 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],
>                                                                         tail=0,
>                                                                         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:
> group1.shape
> Out[44]: (26, 1, 961)
>
> group2.shape
> Out[45]: (27, 1, 961)
>
> group4.shape
> Out[46]: (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.
>
> Cheers,
> Amir
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



More information about the Mne_analysis mailing list