Skip to content

Commit

Permalink
Add example on PERMANOVA (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman authored Nov 18, 2024
1 parent 309cd07 commit 6920c5c
Showing 1 changed file with 47 additions and 0 deletions.
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

0 comments on commit 6920c5c

Please sign in to comment.