Hi all,
I'm trying to run spatiotemporal cluster permutation on evoked responses in
a within subjects design where each subject is observed in two conditions:
cond1 and cond2:
to do so I'm using the following:
# for 17 subjects and 100 ms time window
conditions= [cond1, cond2]
for j, cond in enumerate(conditions):
X_tmp = np.zeros((17, 101, 102))
for i, subject in enumerate(subjects):
evoked = mne.read_evokeds(fname)
grads= evoked.pick_types(meg="grad")
rms = rms_grad(grads.data)
X_tmp[i, :] = np.transpose(rms)
if j == 0:
X = X_tmp
else:
X = np.vstack((X, X_tmp))
connectivity, ch_names = find_ch_connectivity(evoked.info, ch_type='mag')
T_obs, clusters, p_values, _ = spatio_temporal_cluster_test([X[:17],
X[17:]],
n_permutations=5000,
tail=0,
n_jobs=2,
connectivity=connectivity)
After around 20 mints of running the script, the returned p_values look
like this:
p_values
Out[68]:
array([ 0.9476, 1. , 1. , 0.8854, 1. , 1. , 0.9966,
1. , 1. , 1. , 1. , 1. , 0.9974, 1. ,
1. , 1. , 1. , 1. ])
My question is, given the input data: [X[:17], X[17:]] where:
X[17:] contains the data observed in cond1 from all 17 subjects and
similarly X[17:] is the data observed in cond2.
are the permutations in this case done between cond1 and cond2 within the
same subject (as should be) or randomly between subjects?
Many thanks in advance
Rasha
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180117/bde1bbe7/attachment.html