0

I've trying to preform a PERMANOVA using adonis2 on a dissimilarity matrix. My code looks like this.

adonis2(formula = bray_curtis_dist ~ treatment, data = metadata, 
        permutations = 999)

For the metadata, if I change around the order of my samples (say I order by treatment rather than by ID), the results change drastically. Does adonis2 not match sample names?

This is my results if the metadata is arranged first by ID and then second by Supplement Type. It seems like the SumOfSqs are not the same between the two, and the pvaules are very different. Why does this happen? I get these same values every time I load up a metadata file arranged by either ID or treatment. These files are exactly the same, minus the order of samples.

Thanks!

Permutation test for adonis under reduced model
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Permutation: free
Number of permutations: 255

adonis2(formula = bray_curtis_dist ~ Supplement_Type + Sequence + Supplement_Type:Sequence, data = metadata) Df SumOfSqs R2 F Pr(>F) Supplement_Type 1 0.05667 0.01934 0.2781 0.7325 Sequence 1 0.37653 0.12854 1.8482 0.7656 Supplement_Type:Sequence 1 0.05133 0.01752 0.2519 0.8125 Residual 12 2.44477 0.83459
Total 15 2.92930 1.00000

Permutation test for adonis under reduced model Terms added sequentially (first to last) Permutation: free Number of permutations: 255

adonis2(formula = bray_curtis_dist ~ Supplement_Type + Sequence + Supplement_Type:Sequence, data = metadata) Df SumOfSqs R2 F Pr(>F) Supplement_Type 1 0.15567 0.05314 0.7539 0.3365 Sequence 1 0.27412 0.09358 1.3276 0.7344 Supplement_Type:Sequence 1 0.02166 0.00739 0.1049 1.0000 Residual 12 2.47785 0.84588
Total 15 2.92930 1.00000

  • I'm not familiar with adonis2() but I suspect that this might be related to the problem with Type I ANOVA, with terms added sequentially when data aren't balanced. – EdM Feb 15 '24 at 19:05
  • By not balanced, are you referring to sample number? I have 20 samples, 10 subjects. Each volunteer has matching samples and one group is not over represented. – CassandraRegine Feb 15 '24 at 19:43
  • Your model summaries only show 15 degrees of freedom, which seems inconsistent with your having 20 samples. Double-check your data for missing values, etc. – EdM Feb 15 '24 at 20:02
  • Ah, my bad. I meant to say I have 16 total samples, with 8 subjects. I believe 15 Df makes sense. – CassandraRegine Feb 16 '24 at 12:18

0 Answers0