R/auxiliary.R
blockPermute.Rd
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 = 2
)
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'`, default), or exact (`'valid'`) p-value (see Hemerik and Goeman, 2018), or both (`'both'`). Default is `'unbiased'`.
The power p of \(l_p^p\), i.e., \(||x||_p^p = (x_1^p+...x_n^p)\)
The block permutation p-value
Dependencies: buildForward, buildReverse, cachePermute, cacheBlockPermute1, cacheBlockPermute2, getHammingDistance, getLpDistance, naiveBlockPermute1, naiveBlockPermute2