<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bray Curtis Dissimilarity in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539128#M74064</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/264389"&gt;@andrii&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for this interesting question. I didn't know this specific dissimilarity measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_distance_details01.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC DISTANCE documentation&lt;/A&gt; (close to the bottom of that page) I found that the formula SAS uses with &lt;FONT face="courier new,courier"&gt;method=blwnm&lt;/FONT&gt; is not equivalent to your linked formula. However, SAS provides an equivalent formula with &lt;FONT face="courier new,courier"&gt;method=&lt;STRONG&gt;nonmetric&lt;/STRONG&gt;&lt;/FONT&gt;. Actually, the formula looks different, but it's an easy exercise to show that it's equivalent (hint: &lt;FONT face="courier new,courier"&gt;abs(x-y)=x+y-2*min(x,y)&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in order to replicate your result, use this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc distance data=c out=want method=nonmetric;
var ratio(a:);
id id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Note that level "&lt;FONT face="courier new,courier"&gt;ratio&lt;/FONT&gt;" is required for &lt;FONT face="courier new,courier"&gt;method=nonmetric&lt;/FONT&gt;.)&lt;/P&gt;</description>
    <pubDate>Wed, 27 Feb 2019 20:43:48 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-02-27T20:43:48Z</dc:date>
    <item>
      <title>Bray Curtis Dissimilarity</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539093#M74061</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Hi!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;I am trying to calculate&amp;nbsp;Bray Curtis Dissimilarity in SAS by proc distance.&lt;BR /&gt;&lt;BR /&gt;I found an example on the next page:&lt;A href="https://www.statisticshowto.datasciencecentral.com/bray-curtis-dissimilarity/" target="_blank" rel="noopener"&gt;https://www.statisticshowto.datasciencecentral.com/bray-curtis-dissimilarity/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;According to the Formula, the result must be 0.39&lt;BR /&gt;The same numbers I am getting in the R vegan.&lt;BR /&gt;&lt;BR /&gt;Proc distance producing different results.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;data c;
infile datalines;
input id $ A1 A2 A3 ;
datalines;
Fish_1 6 7 4
Fish_2 10 0 6
;
run;
proc distance data=c method=blwnm; 
var ANOMINAL( A: ) ;
id id;
run;&lt;/PRE&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;id&lt;/TD&gt;&lt;TD&gt;Fish_1&lt;/TD&gt;&lt;TD&gt;Fish_2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fish_1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fish_2&lt;/TD&gt;&lt;TD&gt;0,6&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;What am I doing wrong here?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Andrii&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 19:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539093#M74061</guid>
      <dc:creator>andrii</dc:creator>
      <dc:date>2019-02-27T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Bray Curtis Dissimilarity</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539128#M74064</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/264389"&gt;@andrii&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for this interesting question. I didn't know this specific dissimilarity measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_distance_details01.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC DISTANCE documentation&lt;/A&gt; (close to the bottom of that page) I found that the formula SAS uses with &lt;FONT face="courier new,courier"&gt;method=blwnm&lt;/FONT&gt; is not equivalent to your linked formula. However, SAS provides an equivalent formula with &lt;FONT face="courier new,courier"&gt;method=&lt;STRONG&gt;nonmetric&lt;/STRONG&gt;&lt;/FONT&gt;. Actually, the formula looks different, but it's an easy exercise to show that it's equivalent (hint: &lt;FONT face="courier new,courier"&gt;abs(x-y)=x+y-2*min(x,y)&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in order to replicate your result, use this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc distance data=c out=want method=nonmetric;
var ratio(a:);
id id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Note that level "&lt;FONT face="courier new,courier"&gt;ratio&lt;/FONT&gt;" is required for &lt;FONT face="courier new,courier"&gt;method=nonmetric&lt;/FONT&gt;.)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 20:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539128#M74064</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-02-27T20:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bray Curtis Dissimilarity</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539502#M74074</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes, it exactly what I have been looking for!&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 21:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Bray-Curtis-Dissimilarity/m-p/539502#M74074</guid>
      <dc:creator>andrii</dc:creator>
      <dc:date>2019-02-28T21:56:24Z</dc:date>
    </item>
  </channel>
</rss>

