Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example on PERMANOVA #634

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions inst/pages/beta_diversity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,53 @@ tse <- addDivergence(
FUN = getDissimilarity)
```

## Permutational Multivariate Analysis of Variance

PERMANOVA (Permutational Multivariate Analysis of Variance) can be seen as a
non-parametric, multivariate extension of ANOVA (Analysis of Variance). It is
used to compare groups in multivariate data and to assess whether a variable
explains differences in the data. PERMANOVA first calculates the dissimilarities
between samples, then compares the centroids (multivariate means) of each group
to determine if they differ significantly.

PERMANOVA determines statistical significance by permuting (randomly shuffling)
group labels many times. By comparing the observed test statistic to those from
the permutations, it assesses if the observed group differences are likely due
to chance, without relying on parametric assumptions.

Since PERMANOVA relies on comparing centroids, it assumes that the variation
within groups is smaller than the variation between groups, meaning the groups
are distinct. If this assumption isn’t met, it can affect the interpretation of
the results, so it’s important to check this assumption before drawing
conclusions.

```{r}
#| label: permanova

res <- getPERMANOVA(
tse,
assay.type = "relabundance",
formula = x ~ SampleType
)
res
```

The output includes both PERMANOVA and homogeneity results. When PERMANOVA
results are significant, we check the homogeneity results to ensure reliability.
A non-significant homogeneity result indicates that group dispersions are
similar, meaning the group dispersion is homogeneous, and the PERMANOVA results
are reliable.

In our case, PERMANOVA results are significant, and the homogeneity test shows
that group dispersion is indeed homogeneous. This suggests that _SampleType_
explains the variance in the microbial profile.

PERMANOVA and distance-based redundancy analysis (dbRDA) are closely related,
and often they give similar results. However, their assumptions are different;
while PERMANOVA is non-parametric method, dbRDA assumes linear relationships in
dissimilarity matrix. However, dbRDA can be used more broadly as the ordination
can also be visualized.

## Unsupervised ordination {#sec-unsupervised-ordination}

Unsupervised ordination methods analyze variation in the data without additional
Expand Down
Loading