Cell permutation tests (internal)
.cluster_permute_test(
labels,
covariates,
strata,
statistic,
contrasts,
n_perm,
alternative,
...
)
factor
of length n
data.frame
of length n
factor
function of label (vector) and covariate (data.frame). If this returns a vector, then by default each level will be compared against each other, pairwise, but see the next section.
an optional list of numeric vectors. Each will be dotted with the statistic, or optionally a matrix provided in which case each row would be tested one-by-one.
number of permutations to run
character
naming the direction statistic
should be fall under the alternative hypothesis
passed along to statistic
a list containing the observed value of the statistic, the permuted values of the statistic, its expectation (under independence), a p-value, and the Monte Carlo standard error (of the expected value).