<?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 Find most similar record in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Find-most-similar-record/m-p/88552#M9238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I am somewhat new to SAS, and am trying to determine the best course of action to accomplish my goal.&amp;nbsp; I have a data set full of records, and I want to be able to pull one record out and compare it to every other record in the data set across each variable.&amp;nbsp; Then, I'd like to be able to aggregate all the differences in order to find the most similar overall record(s).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, in the data set below, if I choose record A as the base record, I want to be able to compare record A to records B-V across every variable.&amp;nbsp; Afterwards, I want to be able to say "Records L, R, and V are the most similar overall records to record A".&amp;nbsp; I'm assuming this will have to be done using a macro to compare COL1 of record A to COL1 of record B, measuring &amp;amp; saving the difference, and then moving onto comparing record A to record C.&amp;nbsp; But I was hoping there may be a more streamlined way to accomplish this?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know any help if possible!!!&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA test ;&lt;/P&gt;&lt;P&gt;infile datalines delimiter=",";&lt;/P&gt;&lt;P&gt;LENGTH col1 $1.;&lt;/P&gt;&lt;P&gt;input COL1 COL2 COL3 COL4 COL5 COL6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATALINES;&lt;/P&gt;&lt;P&gt;A,72.25,79.5,98,0,0&lt;/P&gt;&lt;P&gt;B,74,79.25,98.5,37.5,31.5&lt;/P&gt;&lt;P&gt;C,71,77.75,94.5,40.5,35.5&lt;/P&gt;&lt;P&gt;D,74,75.5,97,35.5,29.5&lt;/P&gt;&lt;P&gt;E,71.5,76.25,98,33.5,29&lt;/P&gt;&lt;P&gt;F,71.25,76,95.5,40,33&lt;/P&gt;&lt;P&gt;G,73.25,81,97.5,37.5,34&lt;/P&gt;&lt;P&gt;H,75.25,79,100.5,34,28.5&lt;/P&gt;&lt;P&gt;I,73.75,76,99,0,0&lt;/P&gt;&lt;P&gt;J,74.5,79.5,100,28.5,26&lt;/P&gt;&lt;P&gt;K,73.5,78.75,98.5,37.5,29&lt;/P&gt;&lt;P&gt;L,71.25,72.75,94.5,36.5,29&lt;/P&gt;&lt;P&gt;M,73.75,79.75,95.5,39.5,34.5&lt;/P&gt;&lt;P&gt;N,75,77,98,0,0&lt;/P&gt;&lt;P&gt;O,73,0,0,0,0&lt;/P&gt;&lt;P&gt;P,71.75,76.25,93,38,32&lt;/P&gt;&lt;P&gt;Q,73.5,80,98.5,40,34.5&lt;/P&gt;&lt;P&gt;R,72.25,79.5,98.5,36.5,30.5&lt;/P&gt;&lt;P&gt;S,71.5,75.5,91.5,39.5,32&lt;/P&gt;&lt;P&gt;T,74.75,81.25,101.5,39,30&lt;/P&gt;&lt;P&gt;U,74.25,79.75,100,36.5,30&lt;/P&gt;&lt;P&gt;V,73.75,78.25,98,35,30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2013 02:20:52 GMT</pubDate>
    <dc:creator>grodman</dc:creator>
    <dc:date>2013-03-26T02:20:52Z</dc:date>
    <item>
      <title>Find most similar record</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Find-most-similar-record/m-p/88552#M9238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I am somewhat new to SAS, and am trying to determine the best course of action to accomplish my goal.&amp;nbsp; I have a data set full of records, and I want to be able to pull one record out and compare it to every other record in the data set across each variable.&amp;nbsp; Then, I'd like to be able to aggregate all the differences in order to find the most similar overall record(s).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, in the data set below, if I choose record A as the base record, I want to be able to compare record A to records B-V across every variable.&amp;nbsp; Afterwards, I want to be able to say "Records L, R, and V are the most similar overall records to record A".&amp;nbsp; I'm assuming this will have to be done using a macro to compare COL1 of record A to COL1 of record B, measuring &amp;amp; saving the difference, and then moving onto comparing record A to record C.&amp;nbsp; But I was hoping there may be a more streamlined way to accomplish this?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know any help if possible!!!&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA test ;&lt;/P&gt;&lt;P&gt;infile datalines delimiter=",";&lt;/P&gt;&lt;P&gt;LENGTH col1 $1.;&lt;/P&gt;&lt;P&gt;input COL1 COL2 COL3 COL4 COL5 COL6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATALINES;&lt;/P&gt;&lt;P&gt;A,72.25,79.5,98,0,0&lt;/P&gt;&lt;P&gt;B,74,79.25,98.5,37.5,31.5&lt;/P&gt;&lt;P&gt;C,71,77.75,94.5,40.5,35.5&lt;/P&gt;&lt;P&gt;D,74,75.5,97,35.5,29.5&lt;/P&gt;&lt;P&gt;E,71.5,76.25,98,33.5,29&lt;/P&gt;&lt;P&gt;F,71.25,76,95.5,40,33&lt;/P&gt;&lt;P&gt;G,73.25,81,97.5,37.5,34&lt;/P&gt;&lt;P&gt;H,75.25,79,100.5,34,28.5&lt;/P&gt;&lt;P&gt;I,73.75,76,99,0,0&lt;/P&gt;&lt;P&gt;J,74.5,79.5,100,28.5,26&lt;/P&gt;&lt;P&gt;K,73.5,78.75,98.5,37.5,29&lt;/P&gt;&lt;P&gt;L,71.25,72.75,94.5,36.5,29&lt;/P&gt;&lt;P&gt;M,73.75,79.75,95.5,39.5,34.5&lt;/P&gt;&lt;P&gt;N,75,77,98,0,0&lt;/P&gt;&lt;P&gt;O,73,0,0,0,0&lt;/P&gt;&lt;P&gt;P,71.75,76.25,93,38,32&lt;/P&gt;&lt;P&gt;Q,73.5,80,98.5,40,34.5&lt;/P&gt;&lt;P&gt;R,72.25,79.5,98.5,36.5,30.5&lt;/P&gt;&lt;P&gt;S,71.5,75.5,91.5,39.5,32&lt;/P&gt;&lt;P&gt;T,74.75,81.25,101.5,39,30&lt;/P&gt;&lt;P&gt;U,74.25,79.75,100,36.5,30&lt;/P&gt;&lt;P&gt;V,73.75,78.25,98,35,30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 02:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Find-most-similar-record/m-p/88552#M9238</guid>
      <dc:creator>grodman</dc:creator>
      <dc:date>2013-03-26T02:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find most similar record</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Find-most-similar-record/m-p/88553#M9239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can look at propensity score matching, there's a macro on the Mayo Clinic website. &lt;/P&gt;&lt;P&gt;The score should give you an indicator of how well it matches. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 02:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Find-most-similar-record/m-p/88553#M9239</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-03-26T02:57:58Z</dc:date>
    </item>
  </channel>
</rss>

