Generates a block permutation p-value. Uses a heuristic to decide whether to use distance caching or simple block permutations.
blockPermute(X, block_boundaries = NULL, block_labels = NULL, nruns, type, p)The block permutation p-value
The binary or real matrix on which to perform permutation resampling
Vector denoting the positions where a new block of non-independent features starts. Default is NULL.
Length \(P\) vector recording the block label of each feature. Default is NULL.
The resampling number (use at least 1000)
Either an unbiased estimate ('unbiased'), or exact ('valid') p-value (see Hemerik and Goeman, 2018), or both ('both').
The power p of \(l_p^p\), i.e., \(||x||_p^p = (x_1^p+...x_n^p)\)
Dependencies: buildForward, buildReverse, cachePermute, cacheBlockPermute1, cacheBlockPermute2, getHammingDistance, getLpDistance, naiveBlockPermute1, naiveBlockPermute2