<?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 Creating a Distance Matrix using Squared Differences in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184132#M34950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a distance matrix using the following codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc distance data=C02 out=dist method=Euclid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;var interval (pass_rate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;id contract_id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;The distance metric is simply an absolute value of the difference between two pass rates. Now I want to square the difference for each single cell in the matrix, how I can do that? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Any input will be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Oct 2014 17:23:01 GMT</pubDate>
    <dc:creator>cindyforest7</dc:creator>
    <dc:date>2014-10-14T17:23:01Z</dc:date>
    <item>
      <title>Creating a Distance Matrix using Squared Differences</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184132#M34950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a distance matrix using the following codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc distance data=C02 out=dist method=Euclid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;var interval (pass_rate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;id contract_id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;The distance metric is simply an absolute value of the difference between two pass rates. Now I want to square the difference for each single cell in the matrix, how I can do that? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Any input will be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 17:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184132#M34950</guid>
      <dc:creator>cindyforest7</dc:creator>
      <dc:date>2014-10-14T17:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Distance Matrix using Squared Differences</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184133#M34951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select distinct contract_id into :c separated by ' ' from dist;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set dist;&lt;BR /&gt;array ct{*} &amp;amp;c;&lt;BR /&gt;do i=1 to dim(ct);&lt;BR /&gt;ct{i}=(ct{i})**2;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=want;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 17:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184133#M34951</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-14T17:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Distance Matrix using Squared Differences</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184134#M34952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS 9.4 at least, you can ask for METHOD=SQEUCLID to get squared distances. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 18:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Distance-Matrix-using-Squared-Differences/m-p/184134#M34952</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-10-14T18:50:00Z</dc:date>
    </item>
  </channel>
</rss>

