[Mne_analysis] Cluster-based permutation test with correlation

Xia Tao psytao18 at connect.hku.hk
Mon Feb 6 06:00:05 EST 2023
Search archives:

        External Email - Use Caution        

Dear MNE users,

I am trying to explore the relationship between my behavioral outcome and sigma power at all time points. I attempted to conduct a permutation cluster test using Pearson correlation as my statistic, but I encountered an error: TypeError: No loop matching the specified signature and casting was found for ufunc add.

If anyone has encountered this issue and knows how to resolve it, I would greatly appreciate your help.

Here is the code and error in detail:

def statistic(x, y):
    return pearsonr(x, y).statistic

c_obs, clusters_c, cluster_p_values, H0 = \
    permutation_cluster_test([sigma,behavioral],tail=0,threshold=0.05,stat_fun=statistic,n_jobs=-1,n_permutations=1000)#competition vs noncompetition

error:
[cid:c4c57b94-82d8-45b9-b310-e92df4421778]
Thank you,
Tao














-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20230206/5395ec42/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 182451 bytes
Desc: image.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20230206/5395ec42/attachment-0001.png 


More information about the Mne_analysis mailing list