<div dir="ltr"><div><div><div><div><div>Dear mailing list,<br><br></div>I&#39;m doing spatio-temporal clustering on 12 subjects in source space. Very basically, I would like to compare two conditions by taking into account subjects variability, so I need to do a paired ttest/oneway repeated-measure ANOVA. Yet, the <span style lang="EN-US"><span style><span style="font:7pt &quot;Times New Roman&quot;"></span></span></span><span style lang="EN-US">spatio_temporal_cluster_test function is only implementing  oneway anova, while the s</span><span style lang="EN-US">patio_temporal_cluster_1samp_test is implementing simple ttest on the difference<em>.<br></em></span><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal"></span></em></span></div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">I looked at related issues on github and found that there is a twoway anova with repeated measures function implemented under the name of f_twoway_rm but it doesn&#39;t work for oneway anova (factor_levels = [2], n_conditions = 2). Then I tried to build a stat_fun function from </span></em></span><br><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">scipy.stats.ttest_rel:<br></span></em></span></div><div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">def stat_fun(*args):<br></span></em></span></div><div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">      a = X[0]<br></span></em></span><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">      b = X[1]<br></span></em></span><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">      return </span></em></span><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">scipy.stats.ttest_rel(a,b)<br></span></em></span></div><div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">But I get an error at lign 708 in _permutation_cluster_test (cannot copy sequence with size 2 to array axis with dimension 0), I guessed there is a format problem in my stat_fun function...<br></span></em></span></div><div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">Did someone find a way to do such an analysis?<br><br></span></em></span></div><div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal">Thanks in advance,<br>Laetitia Grabot.<br></span></em></span></div><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal"></span></em></span><span style lang="EN-US"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-style:normal"></span></em></span></div></div></div>