hippomaps.stats.moran_test
- hippomaps.stats.moran_test(imgfix, imgperm, nperm=1000, metric='pearsonr', label='hipp', den='0p5mm')
Moran Spectral Randomization Moran Spectral Randomization (MSR) computes Moran’s I, a metric for spatial auto-correlation and generates normally distributed data with similar auto-correlation. MSR relies on a weight matrix denoting the spatial proximity of features to one another. Within neuroimaging, one straightforward example of this is inverse geodesic distance i.e. distance along the cortical surface.
Code from BrainSpace https://brainspace.readthedocs.io/en/latest/python_doc/auto_examples/plot_tutorial3.html Vos de Wael, Reinder, Oualid Benkarim, Casey Paquola, Sara Lariviere, Jessica Royer, Shahin Tavakol, Ting Xu et al. “BrainSpace: a toolbox for the analysis of macroscale gradients in neuroimaging and connectomics datasets.” Communications biology 3, no. 1 (2020): 103.
- 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). Default is ‘pearsonr’.
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.)