<?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 How is Somers' D calculated in PROC LOGISTIC? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-is-Somers-D-calculated-in-PROC-LOGISTIC/m-p/812693#M40087</link>
    <description>&lt;P&gt;Lets say we want to calculate Somers' D (SD) on the following data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
x = 1; y = 1; output;
x = 1; y = 1; output;
x = 1; y = 0; output;
x = 0; y = 0; output;
x = 1; y = 1; output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;According to the definitions in the &lt;A href="https://en.wikipedia.org/wiki/Somers%27_D" target="_self"&gt;wiki&lt;/A&gt; article the following can be observed:&lt;/P&gt;
&lt;P&gt;concordant pairs = 3&lt;/P&gt;
&lt;P&gt;discordant pairs = 0&lt;/P&gt;
&lt;P&gt;tied pairs = 3&lt;/P&gt;
&lt;P&gt;all pairs = 10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given these results, SD would be equal to (3 - 0)/(10 - 3) = 0.4285&lt;/P&gt;
&lt;P&gt;Now if we execute the PROC LOGISTIC procedure we get the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
model y = x;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorkashlik123_15" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kashlik123_14-1652283019149.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71324i14A1D9F0542372CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kashlik123_14-1652283019149.png" alt="kashlik123_14-1652283019149.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The results show a different value for SD. In addition if 50% of the pairs are tied, which means that the total number of pairs according to the output is equal to&lt;/P&gt;
&lt;P&gt;6 + 6*0.5 = 9, which is incorrect.&lt;/P&gt;
&lt;P&gt;Can someone please explain to me what I am missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 15:35:21 GMT</pubDate>
    <dc:creator>kashlik123</dc:creator>
    <dc:date>2022-05-11T15:35:21Z</dc:date>
    <item>
      <title>How is Somers' D calculated in PROC LOGISTIC?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-is-Somers-D-calculated-in-PROC-LOGISTIC/m-p/812693#M40087</link>
      <description>&lt;P&gt;Lets say we want to calculate Somers' D (SD) on the following data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
x = 1; y = 1; output;
x = 1; y = 1; output;
x = 1; y = 0; output;
x = 0; y = 0; output;
x = 1; y = 1; output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;According to the definitions in the &lt;A href="https://en.wikipedia.org/wiki/Somers%27_D" target="_self"&gt;wiki&lt;/A&gt; article the following can be observed:&lt;/P&gt;
&lt;P&gt;concordant pairs = 3&lt;/P&gt;
&lt;P&gt;discordant pairs = 0&lt;/P&gt;
&lt;P&gt;tied pairs = 3&lt;/P&gt;
&lt;P&gt;all pairs = 10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given these results, SD would be equal to (3 - 0)/(10 - 3) = 0.4285&lt;/P&gt;
&lt;P&gt;Now if we execute the PROC LOGISTIC procedure we get the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
model y = x;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorkashlik123_15" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kashlik123_14-1652283019149.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71324i14A1D9F0542372CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kashlik123_14-1652283019149.png" alt="kashlik123_14-1652283019149.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The results show a different value for SD. In addition if 50% of the pairs are tied, which means that the total number of pairs according to the output is equal to&lt;/P&gt;
&lt;P&gt;6 + 6*0.5 = 9, which is incorrect.&lt;/P&gt;
&lt;P&gt;Can someone please explain to me what I am missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 15:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-is-Somers-D-calculated-in-PROC-LOGISTIC/m-p/812693#M40087</guid>
      <dc:creator>kashlik123</dc:creator>
      <dc:date>2022-05-11T15:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How is Somers' D calculated in PROC LOGISTIC?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-is-Somers-D-calculated-in-PROC-LOGISTIC/m-p/812709#M40089</link>
      <description>&lt;P&gt;All of the statistics in the "Association of Predicted Probabilities and Observed Responses" table can be computed as shown in &lt;A href="http://support.sas.com/kb/45767" target="_self"&gt;this note&lt;/A&gt;. As noted in the Details:&amp;nbsp;Model Fitting Information:&amp;nbsp;Rank Correlation of Observed Responses and Predicted Probabilities section of the LOGISTIC documentation where these statistics are defined, each pair of observations must have differing responses. So, there are 6 pairs, not 10.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 17:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-is-Somers-D-calculated-in-PROC-LOGISTIC/m-p/812709#M40089</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-05-11T17:09:16Z</dc:date>
    </item>
  </channel>
</rss>

