NMDS gives conflicting results to ANOSIM and ADONIS












0















I am testing differences in community composition between fished and no-take areas, and while the nmds seems to indicate the two levels overlap considerably, ANOSIM and ADONIS suggest there are significant differences. Have I done something wrong or is there a reason for this significant difference that I can't see?



species

env=species[,1]
species=species[,-1]
species = species[,colSums(species) > 2]

nmds=metaMDS(species, distance="bray", k=3, type="n", trymax=100)
nmds
env$Protection=as.factor(env$Protection)
pointvec <- c(21, 21)
bgvec <- c("black","white")
with(env, levels(Protection))
plot(nmds,type="n",xaxt='n',xlab="",cex.lab=1.5,cex.axis=1.4,xlim=c(-1.5,1.5),ylim=c(-1.2,1))
axis(side=1)
with(env, points(nmds,pch=pointvec[Protection],cex=1,bg = bgvec[Protection],type="p" ,display="sites"))
ordiellipse(nmds, groups=env$Protection, kind = "se", conf = 0.95)
legend("topleft", "A", bty="n",cex=1.5,inset=-0.02,adj=1)
legend("bottomright", "Stress = 0.182", bty="n",cex=1.5)
with(env,legend("topright", legend = levels(Protection),inset=-0.007,cex=1.5,bty="n",pt.bg = bgvec,pch=pointvec))


nmds plot showing close overlap of groups



spe.dist <- vegdist(species,method='bray')
spe.ano <- anosim(spe.dist, env$Protection)
summary(spe.ano)

#Call:
#anosim(x = spe.dist, grouping = env$Protection)
#Dissimilarity: bray

#ANOSIM statistic R: 0.04693
#Significance: 0.029

#Permutation: free
#Number of permutations: 999

#Upper quantiles of permutations (null model):
#90% 95% 97.5% 99%
#0.0290 0.0398 0.0487 0.0593

#Dissimilarity ranks between and within classes:
# 0% 25% 50% 75% 100% N
#Between 1 655.625 1193.50 1771.25 2317 1184
#fished 3 750.500 1360.00 1896.50 2317 666
#no-take 2 358.125 837.25 1525.00 2285 496


And then the permanova gives a similar result



adonis(species~env$Protection,method='bray')

#Call:
#adonis(formula = species ~ env$Protection, method = "bray")
#Permutation: free
#Number of permutations: 999
#Terms added sequentially (first to last)

# Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
#env$Protection 1 0.9517 0.95174 2.8946 0.04141 0.002 **
#Residuals 67 22.0296 0.32880 0.95859
#Total 68 22.9813 1.00000
#---
#Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1









share|improve this question





























    0















    I am testing differences in community composition between fished and no-take areas, and while the nmds seems to indicate the two levels overlap considerably, ANOSIM and ADONIS suggest there are significant differences. Have I done something wrong or is there a reason for this significant difference that I can't see?



    species

    env=species[,1]
    species=species[,-1]
    species = species[,colSums(species) > 2]

    nmds=metaMDS(species, distance="bray", k=3, type="n", trymax=100)
    nmds
    env$Protection=as.factor(env$Protection)
    pointvec <- c(21, 21)
    bgvec <- c("black","white")
    with(env, levels(Protection))
    plot(nmds,type="n",xaxt='n',xlab="",cex.lab=1.5,cex.axis=1.4,xlim=c(-1.5,1.5),ylim=c(-1.2,1))
    axis(side=1)
    with(env, points(nmds,pch=pointvec[Protection],cex=1,bg = bgvec[Protection],type="p" ,display="sites"))
    ordiellipse(nmds, groups=env$Protection, kind = "se", conf = 0.95)
    legend("topleft", "A", bty="n",cex=1.5,inset=-0.02,adj=1)
    legend("bottomright", "Stress = 0.182", bty="n",cex=1.5)
    with(env,legend("topright", legend = levels(Protection),inset=-0.007,cex=1.5,bty="n",pt.bg = bgvec,pch=pointvec))


    nmds plot showing close overlap of groups



    spe.dist <- vegdist(species,method='bray')
    spe.ano <- anosim(spe.dist, env$Protection)
    summary(spe.ano)

    #Call:
    #anosim(x = spe.dist, grouping = env$Protection)
    #Dissimilarity: bray

    #ANOSIM statistic R: 0.04693
    #Significance: 0.029

    #Permutation: free
    #Number of permutations: 999

    #Upper quantiles of permutations (null model):
    #90% 95% 97.5% 99%
    #0.0290 0.0398 0.0487 0.0593

    #Dissimilarity ranks between and within classes:
    # 0% 25% 50% 75% 100% N
    #Between 1 655.625 1193.50 1771.25 2317 1184
    #fished 3 750.500 1360.00 1896.50 2317 666
    #no-take 2 358.125 837.25 1525.00 2285 496


    And then the permanova gives a similar result



    adonis(species~env$Protection,method='bray')

    #Call:
    #adonis(formula = species ~ env$Protection, method = "bray")
    #Permutation: free
    #Number of permutations: 999
    #Terms added sequentially (first to last)

    # Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
    #env$Protection 1 0.9517 0.95174 2.8946 0.04141 0.002 **
    #Residuals 67 22.0296 0.32880 0.95859
    #Total 68 22.9813 1.00000
    #---
    #Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1









    share|improve this question



























      0












      0








      0








      I am testing differences in community composition between fished and no-take areas, and while the nmds seems to indicate the two levels overlap considerably, ANOSIM and ADONIS suggest there are significant differences. Have I done something wrong or is there a reason for this significant difference that I can't see?



      species

      env=species[,1]
      species=species[,-1]
      species = species[,colSums(species) > 2]

      nmds=metaMDS(species, distance="bray", k=3, type="n", trymax=100)
      nmds
      env$Protection=as.factor(env$Protection)
      pointvec <- c(21, 21)
      bgvec <- c("black","white")
      with(env, levels(Protection))
      plot(nmds,type="n",xaxt='n',xlab="",cex.lab=1.5,cex.axis=1.4,xlim=c(-1.5,1.5),ylim=c(-1.2,1))
      axis(side=1)
      with(env, points(nmds,pch=pointvec[Protection],cex=1,bg = bgvec[Protection],type="p" ,display="sites"))
      ordiellipse(nmds, groups=env$Protection, kind = "se", conf = 0.95)
      legend("topleft", "A", bty="n",cex=1.5,inset=-0.02,adj=1)
      legend("bottomright", "Stress = 0.182", bty="n",cex=1.5)
      with(env,legend("topright", legend = levels(Protection),inset=-0.007,cex=1.5,bty="n",pt.bg = bgvec,pch=pointvec))


      nmds plot showing close overlap of groups



      spe.dist <- vegdist(species,method='bray')
      spe.ano <- anosim(spe.dist, env$Protection)
      summary(spe.ano)

      #Call:
      #anosim(x = spe.dist, grouping = env$Protection)
      #Dissimilarity: bray

      #ANOSIM statistic R: 0.04693
      #Significance: 0.029

      #Permutation: free
      #Number of permutations: 999

      #Upper quantiles of permutations (null model):
      #90% 95% 97.5% 99%
      #0.0290 0.0398 0.0487 0.0593

      #Dissimilarity ranks between and within classes:
      # 0% 25% 50% 75% 100% N
      #Between 1 655.625 1193.50 1771.25 2317 1184
      #fished 3 750.500 1360.00 1896.50 2317 666
      #no-take 2 358.125 837.25 1525.00 2285 496


      And then the permanova gives a similar result



      adonis(species~env$Protection,method='bray')

      #Call:
      #adonis(formula = species ~ env$Protection, method = "bray")
      #Permutation: free
      #Number of permutations: 999
      #Terms added sequentially (first to last)

      # Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
      #env$Protection 1 0.9517 0.95174 2.8946 0.04141 0.002 **
      #Residuals 67 22.0296 0.32880 0.95859
      #Total 68 22.9813 1.00000
      #---
      #Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1









      share|improve this question
















      I am testing differences in community composition between fished and no-take areas, and while the nmds seems to indicate the two levels overlap considerably, ANOSIM and ADONIS suggest there are significant differences. Have I done something wrong or is there a reason for this significant difference that I can't see?



      species

      env=species[,1]
      species=species[,-1]
      species = species[,colSums(species) > 2]

      nmds=metaMDS(species, distance="bray", k=3, type="n", trymax=100)
      nmds
      env$Protection=as.factor(env$Protection)
      pointvec <- c(21, 21)
      bgvec <- c("black","white")
      with(env, levels(Protection))
      plot(nmds,type="n",xaxt='n',xlab="",cex.lab=1.5,cex.axis=1.4,xlim=c(-1.5,1.5),ylim=c(-1.2,1))
      axis(side=1)
      with(env, points(nmds,pch=pointvec[Protection],cex=1,bg = bgvec[Protection],type="p" ,display="sites"))
      ordiellipse(nmds, groups=env$Protection, kind = "se", conf = 0.95)
      legend("topleft", "A", bty="n",cex=1.5,inset=-0.02,adj=1)
      legend("bottomright", "Stress = 0.182", bty="n",cex=1.5)
      with(env,legend("topright", legend = levels(Protection),inset=-0.007,cex=1.5,bty="n",pt.bg = bgvec,pch=pointvec))


      nmds plot showing close overlap of groups



      spe.dist <- vegdist(species,method='bray')
      spe.ano <- anosim(spe.dist, env$Protection)
      summary(spe.ano)

      #Call:
      #anosim(x = spe.dist, grouping = env$Protection)
      #Dissimilarity: bray

      #ANOSIM statistic R: 0.04693
      #Significance: 0.029

      #Permutation: free
      #Number of permutations: 999

      #Upper quantiles of permutations (null model):
      #90% 95% 97.5% 99%
      #0.0290 0.0398 0.0487 0.0593

      #Dissimilarity ranks between and within classes:
      # 0% 25% 50% 75% 100% N
      #Between 1 655.625 1193.50 1771.25 2317 1184
      #fished 3 750.500 1360.00 1896.50 2317 666
      #no-take 2 358.125 837.25 1525.00 2285 496


      And then the permanova gives a similar result



      adonis(species~env$Protection,method='bray')

      #Call:
      #adonis(formula = species ~ env$Protection, method = "bray")
      #Permutation: free
      #Number of permutations: 999
      #Terms added sequentially (first to last)

      # Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
      #env$Protection 1 0.9517 0.95174 2.8946 0.04141 0.002 **
      #Residuals 67 22.0296 0.32880 0.95859
      #Total 68 22.9813 1.00000
      #---
      #Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1






      vegan






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 '18 at 17:21







      Guidofish

















      asked Nov 24 '18 at 20:08









      GuidofishGuidofish

      2315




      2315
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Firstly, the NMDS graphics and your tests are inconsistent: tests are for the location of class centroids, but the graph shows the spread of observations. ordiellipse(..., kind = "se", conf = 0.95) would be more consistent with the tests. Secondly, the tests (in particular, adonis -- I would not use anosim) are based on the full n-dimensional space interpreted as Euclidean, whereas NMDS is a two-dimensional mapping of a non-Euclidean dissimilarity (although the NMDS plot itself is Euclidean). It may be that your groups differ in third dimension that you have not estimated.






          share|improve this answer
























          • thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

            – Guidofish
            Nov 25 '18 at 17:25











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53461937%2fnmds-gives-conflicting-results-to-anosim-and-adonis%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Firstly, the NMDS graphics and your tests are inconsistent: tests are for the location of class centroids, but the graph shows the spread of observations. ordiellipse(..., kind = "se", conf = 0.95) would be more consistent with the tests. Secondly, the tests (in particular, adonis -- I would not use anosim) are based on the full n-dimensional space interpreted as Euclidean, whereas NMDS is a two-dimensional mapping of a non-Euclidean dissimilarity (although the NMDS plot itself is Euclidean). It may be that your groups differ in third dimension that you have not estimated.






          share|improve this answer
























          • thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

            – Guidofish
            Nov 25 '18 at 17:25
















          2














          Firstly, the NMDS graphics and your tests are inconsistent: tests are for the location of class centroids, but the graph shows the spread of observations. ordiellipse(..., kind = "se", conf = 0.95) would be more consistent with the tests. Secondly, the tests (in particular, adonis -- I would not use anosim) are based on the full n-dimensional space interpreted as Euclidean, whereas NMDS is a two-dimensional mapping of a non-Euclidean dissimilarity (although the NMDS plot itself is Euclidean). It may be that your groups differ in third dimension that you have not estimated.






          share|improve this answer
























          • thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

            – Guidofish
            Nov 25 '18 at 17:25














          2












          2








          2







          Firstly, the NMDS graphics and your tests are inconsistent: tests are for the location of class centroids, but the graph shows the spread of observations. ordiellipse(..., kind = "se", conf = 0.95) would be more consistent with the tests. Secondly, the tests (in particular, adonis -- I would not use anosim) are based on the full n-dimensional space interpreted as Euclidean, whereas NMDS is a two-dimensional mapping of a non-Euclidean dissimilarity (although the NMDS plot itself is Euclidean). It may be that your groups differ in third dimension that you have not estimated.






          share|improve this answer













          Firstly, the NMDS graphics and your tests are inconsistent: tests are for the location of class centroids, but the graph shows the spread of observations. ordiellipse(..., kind = "se", conf = 0.95) would be more consistent with the tests. Secondly, the tests (in particular, adonis -- I would not use anosim) are based on the full n-dimensional space interpreted as Euclidean, whereas NMDS is a two-dimensional mapping of a non-Euclidean dissimilarity (although the NMDS plot itself is Euclidean). It may be that your groups differ in third dimension that you have not estimated.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 25 '18 at 14:10









          Jari OksanenJari Oksanen

          1,780714




          1,780714













          • thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

            – Guidofish
            Nov 25 '18 at 17:25



















          • thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

            – Guidofish
            Nov 25 '18 at 17:25

















          thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

          – Guidofish
          Nov 25 '18 at 17:25





          thanks @Jari Oksanen. I have edited the question to include ordiellipse instead. It does still present considerable overlap. Is there another way to display the data to see these differences in the third dimension? It also seems strange that the R squared is so low (0.04) and yet there is still a significant difference. Does this make sense?

          – Guidofish
          Nov 25 '18 at 17:25




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53461937%2fnmds-gives-conflicting-results-to-anosim-and-adonis%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'