enigmatoolbox.permutation_testing.spin_test¶
-
enigmatoolbox.permutation_testing.
spin_test
(map1, map2, surface_name='fsa5', parcellation_name='aparc', n_rot=1000, type='pearson', null_dist=False, ventricles=False)[source]¶ Spin permutation (author: @saratheriver)
Parameters: - 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
- surface_name (string, optional) – Surface name {‘fsa5’, ‘fsa5_with_sctx’}. Use ‘fsa5’ for Conte69. Default is ‘fsa5’.
- parcellation_name (string, optional) – Parcellation name {‘aparc’, ‘aparc_aseg’}. Default is ‘aparc’.
- n_rot (int, optional) – Number of spin rotations. Default is 1000.
- type (string, optional) – Correlation type {‘pearson’, ‘spearman’}. Default is ‘pearson’.
- null_dist (bool, optional) – Output null correlations. Default is False.
- ventricles (bool, optional) – Whether ventricles are present in map1, map2. Only used when
parcellation_name is 'aparc_aseg'
. Default is False.
Returns: - p_spin (float) – Permutation p-value
- r_dist (1D ndarray) – Null correlations, shape = (n_rot*2,). Only if
null_dist is True
.
References
- 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.