Different p value generated from adonis2 (vegan)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Different p value generated from adonis2 (vegan)

rohit06
This post has NOT been accepted by the mailing list yet.
Hi,

I am new to R and still trying to figure out how to do some analysis. I have been using the vegan package to do some community analysis on my 16s rRNA gene sequence data.  

Problem:
I am using "adonis2" function to look at differences in the bacterial community. When I run adonis2 back to back, I get different p values. The sum of squares and the pseudo - F value remain the same however, the p values keep on changing.

Method used:
For the analysis, I calculated distance matrix from my OTU table (class - matrix, dim - 12 rows * 6416 columns) using "vegdist".

Code for distance matrix:
dist_bray_OTU_bac = vegdist(OTU, method = "bray")

Code for Adonis2"
nonsterile_bac_adonis = adonis2(dist_bray_OTU_bac ~ metadata_bac$Soil.base,
                                    grouping = metadata_bac$Soil.base, permutations = 999)

Given below are the codes and three output that I got back to back:

> nonsterile_bac_adonis = adonis2(dist_bray_OTU_bac ~ metadata_bac$Soil.base,
                                        grouping = metadata_bac$Soil.base, permutations = 999)
> nonsterile_bac_adonis
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Permutation: free
Number of permutations: 999

adonis2(formula = dist_bray_OTU_bac ~ metadata_bac$Soil.base, permutations = 999, grouping = metadata_bac$Soil.base)
                                    Df SumOfSqs      F Pr(>F)  
metadata_bac$Soil.base  1  0.38759 3.7623  0.002 **
Residual                        10  1.03018                
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> nonsterile_bac_adonis = adonis2(dist_bray_OTU_bac ~ metadata_bac$Soil.base,
                                        grouping = metadata_bac$Soil.base, permutations = 999)
> nonsterile_bac_adonis
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Permutation: free
Number of permutations: 999

adonis2(formula = dist_bray_OTU_bac ~ metadata_bac$Soil.base, permutations = 999, grouping = metadata_bac$Soil.base)
                                    Df SumOfSqs      F Pr(>F)  
metadata_bac$Soil.base  1  0.38759 3.7623  0.005 **
Residual                        10  1.03018                
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

>nonsterile_bac_adonis = adonis2(dist_bray_OTU_bac ~ metadata_bac$Soil.base,
                                   grouping = metadata_bac$Soil.base, permutations = 999)
> nonsterile_bac_adonis
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Permutation: free
Number of permutations: 999

adonis2(formula = dist_bray_OTU_bac ~ metadata_bac$Soil.base, permutations = 999, grouping = metadata_bac$Soil.base)
                                    Df SumOfSqs      F Pr(>F)  
metadata_bac$Soil.base  1  0.38759 3.7623  0.002 **
Residual                         10  1.03018                
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Why does adonis2 give me different p values despite having the same degrees of freedom and sum of squares? Any help is greatly appreciated.

Thanks
Rohit

Loading...