enigmatoolbox.permutation_testing.perm_sphere_p(x, y, perm_id, corr_type='pearson', null_dist=False)[source]

Generate a p-value for the spatial correlation between two parcellated cortical surface maps (author: @saratheriver)

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

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

  • perm_id (ndarray) – Array of permutations, shape = (m, nrot)

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

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


  • p_perm (float) – Permutation p-value

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

See also



  • Alexander-Bloch A, Shou H, Liu S, Satterthwaite TD, Glahn DC, Shinohara RT, Vandekar SN and Raznahan A (2018). On testing for spatial correspondence between maps of human brain structure and function. NeuroImage, 178:540-51.

  • Váša F, Seidlitz J, Romero-Garcia R, Whitaker KJ, Rosenthal G, Vértes PE, Shinn M, Alexander-Bloch A, Fonagy P, Dolan RJ, Goodyer IM, the NSPN consortium, Sporns O, Bullmore ET (2017). Adolescent tuning of association cortex in human structural brain networks. Cerebral Cortex, 28(1):281–294.