<?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: Gini Calculation in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85989#M581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks to one of my R&amp;amp;D colleagues, he wrote up a quick solution using IML, which should match your results in EM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;iml&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;event={&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;517&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;365&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;349&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;269&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;nonevent={&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;233&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;281&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;451&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;535&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;sum1=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;2&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;4&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum2=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; im1=i-&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; j=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; im1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum2=sum2+nonevent&lt;J&gt;;&lt;/J&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum1=sum1 + event&lt;I&gt;*sum2;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;sum3=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum3 = sum3 + event&lt;I&gt;*nonevent&lt;I&gt;;&lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;gini = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; - (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*sum1 + sum3)/ (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1500&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1500&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum1 sum2 sum3 gini;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" summary="Procedure Iml: gini"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;524016&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;965&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;524340&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P&gt;30.1168&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Sep 2013 21:06:41 GMT</pubDate>
    <dc:creator>jwexler</dc:creator>
    <dc:date>2013-09-24T21:06:41Z</dc:date>
    <item>
      <title>Gini Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85986#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how the gini measure of diversity&amp;nbsp; is calculated when creating bins through the interactive binning node? cause i see it alters when i either merge or spliit bins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 10:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85986#M578</guid>
      <dc:creator>chemicalab</dc:creator>
      <dc:date>2013-09-18T10:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Gini Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85987#M579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi as you may already know, the Gini statistic tests for differences in bin values with respect to the target (events vs non-events).&amp;nbsp; As Gini changes in the Interactive Binning node, you get an idea of the validity of your bin cutoffs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find this equation in the EM reference guide in the Interactive Binning node section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="gini.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4203_gini.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 15:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85987#M579</guid>
      <dc:creator>jwexler</dc:creator>
      <dc:date>2013-09-19T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Gini Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85988#M580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok i think i am almost there, but how would the formula look like in the following example? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="189" style="width: 339px; height: 130px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="736"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value&lt;/P&gt;&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="64"&gt;Group&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="64"&gt;Cutoff&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="95"&gt;Event count&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="127"&gt;Non event count&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #5b9bd5;" width="64"&gt;Total&lt;/TD&gt;&lt;TD class="xl64" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; border-left-width: 0.5pt; border-left-color: windowtext; background-color: #5b9bd5;" width="85"&gt;Event rate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;MISSING&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl69" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; border-left-width: 0.5pt; border-left-color: windowtext; background-color: #ddebf7;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;AGE &amp;lt;25&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;25.5&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;517&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;233&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;750&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;68.9%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;25.5&amp;lt;AGE&amp;lt;31&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;31&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;365&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;281&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;646&lt;/TD&gt;&lt;TD align="right" class="xl70" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; border-left-width: 0.5pt; border-left-color: windowtext; background-color: #ddebf7;"&gt;56.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;31.5&amp;lt;AGE&amp;lt;40&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;31.5&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;349&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;451&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext;"&gt;800&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;43.6%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;40&amp;lt;AGE&lt;/TD&gt;&lt;TD align="right" class="xl71" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;5&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl71" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;269&lt;/TD&gt;&lt;TD align="right" class="xl71" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;535&lt;/TD&gt;&lt;TD align="right" class="xl71" style="font-size: 11pt; color: black; font-family: Calibri; border: 0.5pt solid windowtext; background-color: #ddebf7;"&gt;804&lt;/TD&gt;&lt;TD align="right" class="xl72" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; border-left-width: 0.5pt; border-left-color: windowtext; background-color: #ddebf7;"&gt;33.5%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 16:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85988#M580</guid>
      <dc:creator>chemicalab</dc:creator>
      <dc:date>2013-09-19T16:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Gini Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85989#M581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks to one of my R&amp;amp;D colleagues, he wrote up a quick solution using IML, which should match your results in EM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;iml&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;event={&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;517&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;365&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;349&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;269&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;nonevent={&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;233&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;281&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;451&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;535&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;sum1=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;2&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;4&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum2=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; im1=i-&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="PT" style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; j=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; im1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum2=sum2+nonevent&lt;J&gt;;&lt;/J&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum1=sum1 + event&lt;I&gt;*sum2;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;sum3=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum3 = sum3 + event&lt;I&gt;*nonevent&lt;I&gt;;&lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;gini = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; - (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*sum1 + sum3)/ (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1500&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;*&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1500&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sum1 sum2 sum3 gini;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" summary="Procedure Iml: gini"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;524016&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;965&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;524340&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 3.75pt 3.75pt 3.75pt 3.75pt;" valign="top"&gt;&lt;P&gt;30.1168&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 21:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85989#M581</guid>
      <dc:creator>jwexler</dc:creator>
      <dc:date>2013-09-24T21:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Gini Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85990#M582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 07:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Gini-Calculation/m-p/85990#M582</guid>
      <dc:creator>chemicalab</dc:creator>
      <dc:date>2013-09-25T07:16:25Z</dc:date>
    </item>
  </channel>
</rss>

