Generates spatially-constrained surrogate brain maps by matching the empirical variogram of the original data through smoothed random permutations.
Arguments
- data
Numeric vector of brain map values.
- distmat
Distance matrix between parcels/vertices.
- n_perm
Integer number of null permutations to generate.
- seed
Optional integer seed for reproducibility.
- ns
Integer, subsample size for variogram computation.
- nh
Integer, number of distance bins for variogram.
- pv
Numeric, percentile cutoff for maximum distance in variogram.
- knn
Integer, number of nearest neighbors for smoothing.
- deltas
Numeric vector of smoothing levels (fractions of
knn).- kernel
Smoothing kernel function.
- resample
Logical. If
FALSE(default, matches brainsmash Python), variogram subsample indices are computed once and reused across all permutations. IfTRUE, a fresh subsample is drawn each time.
Value
A null_distribution object.