> File ~\anaconda3\lib\site-packages\scipy\stats\morestats.py:3123, in wilcoxon(x, y, zero_method, correction, alternative, mode)
> 3121 d = asarray(x)
> 3122 if d.ndim > 1:
> -> 3123 raise ValueError('Sample x must be one-dimensional.')
I can’t figure out what’s wrong, as the scipy.stats.wilcoxon function indeed receives 1D input, as requested in the permutation_cluster_1samp_test documentation.
The wilcoxon.statistic returns the W value, which behaves differently from the T statistic used in the original implementation of permutation_cluster_1samp_test. While higher T values indicate stronger effects (i.e., lower p-values), in the case of the Wilcoxon test, it’s the lower W values that correspond to more significant results.
Given this inversion in the interpretation of the statistic, do you have any recommendations for how to appropriately set the other parameters as threshold when using a Wilcoxon-based stat_fun?