Global permutation test of condition separation (PERMANOVA)
Source:R/quant-stats.R
permanova_condition.RdAnswers "do the conditions separate at all?" before any per-feature claim is made, using the distance-based pseudo-F of Anderson (2001): the ratio of between-group to within-group sums of squared Euclidean distances between samples, with a permutation null obtained by shuffling the condition labels. It is non-parametric, makes no distributional assumption, and needs no extra package. Only features quantified in every column are used, since a distance must be computed on a common feature set.
Arguments
- mat
Numeric matrix of (normalized, optionally imputed) log2 intensities, features x units.
- coldata
Column metadata from
build_quant_matrix().- n_perm
Number of label permutations. Default
999.- seed
Random seed. Default
1234.
Value
A list with F (pseudo-F), p_value, n_perm, n_features (complete
features used) and n_groups; NULL with a warning when fewer than two
groups or no complete features are available.