# Understanding PERMANOVA QIIME2 Statistics for Beta Diversity

**URL:** <https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048>\
**Category:** General Discussion\
**Tags:** diversity, permanova\
**Created:** [March 13, 2020, 3:21pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048 "2020-03-13T15:21:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LVC](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@LVC](https://forum.qiime2.org/u/LVC)\
**Post date:** [March 13, 2020, 3:21pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/1 "2020-03-13T15:21:42Z")

</div>

Hello,

I have had a look through the forum and these pages but I am still a bit confused so would appreciate some clarification on the PERMANOVA statistics.

> [@Beta diversity: within and between group comparisons](https://forum.qiime2.org/t/beta-diversity-within-and-between-group-comparisons/1267):
>
> Hello all, I would like to clarify the output of qiime diversity beta-group-significance I am looking for the "All between groups" and "All within groups" comparisons (using t-test pairwise) as well as the rest of the Unifrac distances group comparisons as you used to provide in QIIME 1. Is it possible to do it through QIIME 2? or is the PERMANOVA pairwise analysis replacing this function? Thank you very much for your support. DV.

> [@Beta diversity: within and between group calculation](https://forum.qiime2.org/t/beta-diversity-within-and-between-group-calculation/10197):
>
> Hi For beta diversity analysis I would like to calculate within vs between or between vs between. the result that I getting using the beta\_group\_significance command (at the bottom of the page) are what? between vs. between? and how can I calculate the other options? Thanks Atara

I have run the following command: [beta-group-significance: Beta diversity group significance — QIIME 2 2020.2.0 documentation](https://docs.qiime2.org/2020.2/plugins/available/diversity/beta-group-significance/)  
using the pairwise option.

To simplify, I have two groups called A and B:

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/9/911aea30b9da9c4beb7eae532a1c00c82c51a41b.png)

I want to know what the statistics output means at the bottom of the output page  
eg:

| Group 1 | Group 2 | Sample size | Permutations | pseudo-F | p-value | q-value |
| --- | --- | --- | --- | --- | --- | --- |
| A | B | 329 | 999 | 35.8374808 | 0.001 | 0.001666667 |

The answers previously on the forum say: " The pairwise permanova results at the bottom of the page compares _between_ Group 1 and Group 2, and tests to see if they are statistically significantly different."

From my diagram above I am taking this to mean the statistics are referring to the difference _between_ the within distances observed for A and the within distances observed for B (comparison 1) in the diagram. Is this correct?

If so, is it possible at all to perform PERMANOVA on comparisons 2 and 3 above or should I be using a different test (there was a Monte Carlo permutations 999 option in QIIME 1 previously but what should I be using in QIIME 2?). These values would be more informative to me because in theory the within distance could be very similar but the between distance very different meaning the samples form two distinct clusters but this might not be picked up if only comparison 1 was performed.

I have the plots for comparisons 1, 2 and 3 though.

Any advice or clarification much appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [March 13, 2020, 3:27pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/2 "2020-03-13T15:27:34Z")

</div>

Hi @LVC,  
This topic has a number of links to topics discussing PERMANOVA interpretation, etc, so I recommend taking a look here:

> [@Frequent Questions and "Best of the QIIME 2 Forum"](https://forum.qiime2.org/t/best-of-the-qiime-2-forum/13608):
>
> The following is a list of frequently asked questions on the forum, with answers, to serve as a point of reference for forum users to quickly find answers, or for forum users and moderators to use as a reference when helping others. Note: some of these listings are collapsed lists. If you see an arrow next to a title, click the title to expand the list of topic titles related to that subject. arrow_forwardFAQs [What is a "Feature" exactly? - #3 by Nicholas\_Bokulich](https://forum.qiime2.org/t/what-is-a-feature-exactly/2201/3)[MemoryError with q2-f…](https://forum.qiime2.org/t/feature-classifiers-error/11946/2)

> [@LVC](#):
>
> From my diagram above I am taking this to mean the statistics are referring to the difference _between_ the within distances observed for A and the within distances observed for B (comparison 1) in the diagram. Is this correct?

Great diagram! PERMANOVA is really testing all 3 comparisons — basically, a significant result is telling you that the within-group distances of at least one group are less than the between-group distances for all groups.

> [@LVC](#):
>
> there was a Monte Carlo permutations 999 option in QIIME 1 previously but what should I be using in QIIME 2?

This is controlled by the `--p-permutation` parameter.

Good luck!

---

<div class="post-metadata">

**Author:** ![LVC](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@LVC](https://forum.qiime2.org/u/LVC)\
**Post date:** [March 13, 2020, 3:39pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/3 "2020-03-13T15:39:02Z")

</div>

> [@Nicholas\_Bokulich](#):
>
> ERMANOVA is really testing all 3 comparisons — basically, a significant result is telling you that the within-group distances of at least one group are less than the between-group distances for all groups.

Thanks, that makes sense and I understand it now.

As for:

> [@LVC](#):
>
> there was a Monte Carlo permutations 999 option in QIIME 1 previously but what should I be using in QIIME 2?

This is controlled by the `--p-permutation` parameter.

I meant that the Monte Carlo option reports the stats as:  
comparison 1 - p-value 1  
comparison 2 - p-value 2  
comparison 3 - p-value 3  
And I was wondering if it was possible to get a similar report from QIIME2 also with each comparison broken down instead of one overall p-value for all three.

I could perform a Kruskal-Wallis test on the dataset of permutations and look at each separately in addition to my PERMANOVA result but I am unsure if this is the best approach or whether there is a recommended alternative.

Thanks for your help and the links above.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [March 13, 2020, 4:08pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/4 "2020-03-13T16:08:31Z")

</div>

> [@LVC](#):
>
> And I was wondering if it was possible to get a similar report from QIIME2 also with each comparison broken down instead of one overall p-value for all three.

No, I don't think that's an option. I think we did not implement it in QIIME 2 because technically a permutational t-test is not actually an appropriate test for comparing between-sample distances (due to assumptions of independence)

> [@LVC](#):
>
> I could perform a Kruskal-Wallis test on the dataset of permutations and look at each separately in addition to my PERMANOVA result but I am unsure if this is the best approach or whether there is a recommended alternative.

I am not sure that's statistically appropriate. As far as I am aware, Kruskal-Wallis assumes that observations are independent, which between-sample distances are not.

beta-group-significance has a `permdisp` method available, this is the appropriate method for comparing within-group beta dispersions by looking at distance to the centroid of each group.

I hope that helps!

---

<div class="post-metadata">

**Author:** ![LVC](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@LVC](https://forum.qiime2.org/u/LVC)\
**Post date:** [March 16, 2020, 2:44pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/5 "2020-03-16T14:44:05Z")

</div>

Yes, you are right, Kruskal-Wallis isn't appropriate now I've looked into it.  
Thanks again for all your help. I've got it sorted and understand it properly now I hope and the results are looking good.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [April 16, 2020, 8:44pm UTC](https://forum.qiime2.org/t/understanding-permanova-qiime2-statistics-for-beta-diversity/14048/6 "2020-04-16T20:44:41Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
