[Mne_analysis] Using 'ttest_ind_no_p' as stat_fun in permutation_cluster_test

pooja prabhu prabhuppooja at gmail.com
Tue Mar 8 05:38:35 EST 2022
Search archives:

        External Email - Use Caution        

Hi,
I have to perform a permutation_cluster_test on two samples of data. I see
the default stat_fun used is mne.stats.f_oneway
<https://secure-web.cisco.com/1ylzfooB-LvhF1-6clMhgF6Er6hRt6Ii5A_ljAxDYuOKY0DEmZx9cqdaV5gvkj0DqGZyi0ACv0F-pa8_Jpe9b58eVyef6j6ewgaFST7NfwBOMqo-kmpuzGMRyJVS3E-TpNOHRTmXVbvQakJznD-CIGYwwMURC2ePIWbXKhiq71vx3clNZ6BGKxq2cs8JCB-AyrClvmhZzM3u-WV4Qlg5k7VBZA1ZjbIwdmrQXrAiaMtpVguaIpuOrWRsopRUU0mPjkNseKBn6aqaWOfSWKOESq34pAjMbw3r5-r9BvA9-Rq_cj6v0_L-2X0rePBajpVMNN0ZYy7sJuG2F8bBxLpEMcw/https%3A%2F%2Fmne.tools%2Fdev%2Fgenerated%2Fmne.stats.f_oneway.html%23mne.stats.f_oneway>
(which
compares the standard deviation between the two samples). In my study I
want to compare the mean between the two samples which is X of shape (39,
10, 8) and Y of shape (54, 10, 8). To do this, I want to use
'ttest_ind_no_p' as stat_fun.
So, I defined the function
def stat_fun(*args):
      return mne.stats.ttest_ind_no_p(args, equal_var=True, sigma=0.0)

Then,
 stats=permuation_cluster_test([X,Y], 1000, threshold, tail=0,
stat_fun=stat_fun)

It throws up an error
TypeError: ttest_ind_no_p() missing 1 required positional argument: 'b'.

I checked the issues listed in Github:
https://secure-web.cisco.com/1LrlqYYL8W3_I5fzv0r0UByQ6P2fcWqw2WVnCN8LV4_sqm4PisTpV80ojKGT-RXWsjne1WnE9iB_u5yDa90JTGGABtqsRvvA75xDE1pQGSyD1kwqzbvl3gfiklrl0iqR0SHy-dKhPeh40x2q5u4rWN9tY1vZUktYFX158b2t67xUStozf6Cbe8El0CP7rAHt8TfpJYj4zqDWLnQ-csanZ-RVdxGLMObxuBoK1kK0IE-qj9Mbd7kZEACscHAnke9z3dMXHeY6lNXZiqgn6cFdqW8zobINXU2asBZEd353K7tM3_4LT9gGj0tIM86yt37hurwL_r7EVFlrwXwh4tDSOnA/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fpull%2F7686 Nowhere, it demonstrates
how 'ttest_ind_no_p' can be callable for two sample data for
permutation_cluster_test.

It will be of great help if someone can help with defining the function for
'ttest_ind_no_p'.

Thanks.


-- 
Thank You
Pooja Prabhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20220308/2b5bcd49/attachment.html 


More information about the Mne_analysis mailing list