Tests whether community composition differs among groups with the W*d
statistic of Hamidi et al. (2019), a distance-based generalisation of
Welch's ANOVA. Unlike classic PERMANOVA (beta_permanova()), it does
not assume that groups have the same multivariate dispersion, so a
significant result reflects a shift in location even when groups differ
in spread or size. For two groups it equals the Tw2 test of Alekseyenko
(2016). With one variable and Euclidean distance it equals Welch's
F statistic (stats::oneway.test() with var.equal = FALSE).
Usage
beta_welch(
data,
site = site,
species = species,
abundance = NULL,
group,
env = NULL,
distance = "bray",
transform = "none",
permutations = 999
)Arguments
- data
A data frame in long format, with one row per record.
- site, species
<
tidy-select> The column holding site identifiers and the column holding species names.- abundance
<
tidy-select> The column holding counts. IfNULL(the default), a column calledabundanceis used when present, otherwise every row counts as one individual.- group
Site variable (unquoted) defining the groups.
- env
A data frame of site variables with a column named like the site column. By default, site variables are taken from
data: every column that is constant within each site.- distance
Dissimilarity for
"pcoa","nmds"and"dbrda", passed tovegan::vegdist(), such as"bray"(the default) or"jaccard".- transform
Transformation of the community matrix before the analysis:
"hellinger"(the default for PCA and RDA, which otherwise overweight abundant species; Legendre and Gallagher 2001),"chord","log"(log(x) + 1 for x > 0),"sqrt","pa"(presence-absence) or"none"(the default for the other methods).- permutations
Number of permutations.
References
Hamidi, B. et al. (2019). W*d-test: robust distance-based multivariate analysis of variance. Microbiome, 7, 51. doi:10.1186/s40168-019-0659-9
Alekseyenko, A. V. (2016). Multivariate Welch t-test on distances. Bioinformatics, 32, 3552-3558. doi:10.1093/bioinformatics/btw524