[Mne_analysis] Permutation cluster test for repeated measures
amir Djalovski
amir.djv at gmail.com
Wed May 22 05:13:31 EDT 2019
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
<https://martinos.org/mne/stable/auto_examples/connectivity/plot_sensor_connectivity.html>,
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
<https://martinos.org/mne/stable/generated/mne.stats.permutation_cluster_test.html>.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190522/1c3fd943/attachment-0001.html
More information about the Mne_analysis
mailing list