<?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: proc distance, distance inversion in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-distance-distance-inversion/m-p/108636#M30288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not very familiar with PROC DISTANCE, but I would think that this might do the trick, even though I'm not exactly sure how your data looks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If each row has two values (earnings and education), then the inverse would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;earnings_inv=earnings-max(earnings,education);&lt;/P&gt;&lt;P&gt;education_inv=education-max(earnings,education);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 18:40:20 GMT</pubDate>
    <dc:creator>djbateman</dc:creator>
    <dc:date>2013-04-15T18:40:20Z</dc:date>
    <item>
      <title>proc distance, distance inversion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-distance-distance-inversion/m-p/108635#M30287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to 'invert' distance values from a proc distance so the output would correspond to the highest distance value would be coded as zero and a distance value of zero would be coded as the highest distance value.&amp;nbsp; I can do this by multiplying the distance values by -1 and then adding the max value but was looking for an automated way to approach the solution.&amp;nbsp; Is there an automated way to refer to the maximum value for a variable using a by statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Say you have 72 counties of data for per capita earnings and average education.&amp;nbsp; You use this data to create a distance matrix using per capita earnings and average education as variables.&amp;nbsp; Each county has a distance (method=euclid) that ranges from zero to a maximum value.&amp;nbsp; Is there a way to refer to the maximum value of the distance by county?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-distance-distance-inversion/m-p/108635#M30287</guid>
      <dc:creator>jdub</dc:creator>
      <dc:date>2013-04-15T18:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc distance, distance inversion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-distance-distance-inversion/m-p/108636#M30288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not very familiar with PROC DISTANCE, but I would think that this might do the trick, even though I'm not exactly sure how your data looks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If each row has two values (earnings and education), then the inverse would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;earnings_inv=earnings-max(earnings,education);&lt;/P&gt;&lt;P&gt;education_inv=education-max(earnings,education);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-distance-distance-inversion/m-p/108636#M30288</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2013-04-15T18:40:20Z</dc:date>
    </item>
  </channel>
</rss>

