enigmatoolbox.permutation_testing.shuf_test(map1, map2, n_rot=1000, type='pearson', null_dist=False)[source]

Shuf permuation (author: @saratheriver)

  • map1 (narray, ndarray, or pandas.Series) – One of two map to be correlated

  • map2 (narray, ndarray, or pandas.Series) – The other map to be correlated

  • n_rot (int, optional) – Number of shuffles. Default is 1000.

  • type (string, optional) – Correlation type {‘pearson’, ‘spearman’}. Default is ‘pearson’.

  • null_dist (bool, optional) – Output null correlations. Default is False.


  • p_shuf (float) – Permutation p-value

  • r_dist (1D ndarray) – Null correlations, shape = (n_rot*2,). Only if null_dist is True.