glottostat_dist_permanova: Permanova across all groups (overall or pairwise)

View source: R/glottostat.R

glottostat_dist_permanovaR Documentation

Permanova across all groups (overall or pairwise)

Description

This function takes a dist object and performs a Permutational Multivariate Analysis of Variance (PERMANOVA). It can be used to test whether two or more groups are significantly different from each other (by specifying the comparison argument with either 'overall' or 'pairwise').

Usage

glottostat_dist_permanova(
  glottodist = NULL,
  glottodata = NULL,
  comparison = NULL,
  sample = NULL,
  permutations = NULL,
  by = NULL
)

Arguments

glottodist

a dist object

glottodata

glottodata contains sample

comparison

Either "overall" or "pairwise"

sample

sample table (optional). By default, searches for sample table in glottodata/glottosubdata.

permutations

Number of permutations (default is 999)

by

the column name of "sample", over which to compute the permanova.

Details

The argument by is the name of a column in the sample table, which can be either provided by a "sample" sheet in glottodata or given by the argument sample. The default value of by is "group". The function uses by to do the comparisons. The function calls vegan::adonis2(), type ?adonis2 for more details.

Examples

glottodata <- glottoget("demodata", meta = TRUE)
glottodist <- glottodist(glottodata, metric = "gower")
glottostat_dist_permanova(glottodist = glottodist, glottodata = glottodata, comparison = "pairwise")



SietzeN/glottospace documentation built on June 15, 2024, 10:45 p.m.