adonis_pairwise: Pairwise comparisons for permutational multivariate analysis...

View source: R/adonis_pairwise.R

adonis_pairwiseR Documentation

Pairwise comparisons for permutational multivariate analysis of variance using distance matrices

Description

Pairwise comparisons for permutational multivariate analysis of variance using distance matrices

Usage

adonis_pairwise(
  x,
  dd,
  group.var,
  add_permdisp = TRUE,
  permut = 999,
  p.adj = "fdr",
  all_results = T,
  comparison_sep = ".",
  permdisp_type = "median",
  ...
)

Arguments

x

Sample meta-data (data frame for the independent variables)

dd

Dissimilarity matrix between samples

group.var

Name of the independent variable to test (RHS in adonis formula)

add_permdisp

Logical; if TRUE (default), results of tests for homogeneity of multivariate dispersions will be added to output (see betadisper)

permut

Number of permutations required

p.adj

Logical or character; if TRUE, adjust P-values for multiple comparisons with FDR; if character, specify correction method from p.adjust ("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", or "none")

all_results

Logical, return results of adonis and data subsets for each pairwise comparison

comparison_sep

Character string to separate the levels of independent variable the in the pairwise comparison names (default, ".")

permdisp_type

Use the spatial median (default) or the group centroid for the analysis for homogeneity of multivariate dispersions (see betadisper)

...

Additional arguments will be passed to adonis and permutest

Value

List with adinonis and betadisper results.

See Also

adonis, betadisper

Examples

library(vegan)
data(dune)
data(dune.env)

# Compare all Management levels
adonis2(dune ~ Management, data = dune.env)

# Pairwise comparisons between Management levels
tst <- adonis_pairwise(x = dune.env, dd = vegdist(dune), group.var = "Management")
tst$Adonis.tab
tst$Betadisper.tab


vmikk/metagMisc documentation built on Feb. 14, 2024, 2:29 a.m.