glottostat_permanova | R Documentation |
This function takes a glottodata or glottosubdata 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'). The function uses the 'group' column in the sample table to do the comparisons. Before running the analysis, a distance matrix is constructed from the glotto(sub)data object using glottodist(). The function calls vegan::adonis2(), type ?adonis2 for more details.
glottostat_permanova(
glottodata,
comparison = NULL,
sample = NULL,
permutations = NULL,
metric = "gower"
)
glottodata |
glottodata or glottosubdata |
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) |
metric |
Either "gower" or "anderberg" |
glottodata <- glottoget("demodata", meta = TRUE)
glottostat_permanova(glottodata, comparison = "pairwise")
# Use subgroup (or another column in the structure table) as group
glottodata[["sample"]][,"group"] <- NULL # delete old 'group' column
glottodata[["sample"]][,"group"] <- glottodata[["sample"]][,"subgroup"]
glottostat_permanova(glottodata, comparison = "pairwise")
glottosubdata <- glottoget("demosubdata", meta = TRUE)
glottostat_permanova(glottodata = glottosubdata, comparison = "pairwise")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.