hippomaps.stats.spin_test
- hippomaps.stats.spin_test(imgfix, imgperm, nperm=1000, metric='pearsonr', label='hipp', den='0p5mm')
Permutation testing of unfolded hippocampus maps.
NOTE that permuations testing will be done in den=’unfoldiso’ desnity!
Original code by Bradley Karat at https://github.com/Bradley-Karat/Hippo_Spin_Testing Karat, B. G., DeKraker, J., Hussain, U., Köhler, S., & Khan, A. R. (2023). Mapping the macrostructure and microstructure of the in vivo human hippocampus using diffusion MRI. Human Brain Mapping. https://doi.org/10.1002/hbm.26461
- Parameters:
imgfix (str or array) – Path to the fixed map, or fixed array map.
imgperm (str or array) – Path to the fixed map to be permuted, or array map to be permuted.
nperm (int) – Number of permutations to perform.
metric (str, optional) – Metric for comparing maps (one of pearsonr, spearmanr, adjusted_mutual_info_score, or adjusted_mutual_info_score). Default is ‘pearson’.
label (str, optional) – Label for the hippocampus (‘hipp’ or ‘dentate’). Default is ‘hipp’.
den (str, optional) – Density of the surface data. Default ‘0p5mm’.
- Returns:
metricnull (Null distribution of the specified metric)
permutedimg (All permuted spatial maps at ‘unfoldiso’ density.)
r_obs (The observed association between the two aligned maps.)
pval (p-value based on metricnull r_obs.)