<?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: How do I match names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/293054#M60920</link>
    <description>&lt;PRE&gt;
Sorry. I don't know what you are talking about.
How do you define that ' probability of match '?
How to calculate ' probability of match' ?
Gives us an example.
&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Aug 2016 08:08:27 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-08-22T08:08:27Z</dc:date>
    <item>
      <title>How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292955#M60893</link>
      <description>&lt;P&gt;Hello Guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 datssets i wnat to mtach the new dataset with the old one and gives %of match like shown below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Company master file like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="211"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="211"&gt;&lt;STRONG&gt;Company_Master&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adamas Pharmaceuticals, Inc.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Acacia Communications, Inc.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;McHugh Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will recive new compay names frequently like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="193"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="193"&gt;&lt;STRONG&gt;Company_New&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adamas Pharmaceuticals, Inc.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adimas Pharmaceuticals, Inc.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;McHugh Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Mc Hugh innc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Mccley INC&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Acacia Communications&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want output like below: match with the master file and gives the % match with the master file names..any ideas i am looking at some compare functions but that not giving satisfactory results. any thoughts?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="302"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="211"&gt;&lt;STRONG&gt;Company_New&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="91"&gt;&lt;STRONG&gt;% Matched&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adamas Pharmaceuticals LLC&lt;/TD&gt;
&lt;TD&gt;90&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adimas Pharmaceuticals&lt;/TD&gt;
&lt;TD&gt;80&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Adamas Pharmaceuticals, Inc.&lt;/TD&gt;
&lt;TD&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;McHugh Inc&lt;/TD&gt;
&lt;TD&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Mc Hugh innc&lt;/TD&gt;
&lt;TD&gt;90&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Mccley INC&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Acacia Communications&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 07:33:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292955#M60893</guid>
      <dc:creator>kumarK</dc:creator>
      <dc:date>2016-08-21T07:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292958#M60894</link>
      <description>&lt;PRE&gt;
How do you computer that %Matched .
Check the function about spell distance and edit distance Like : spedis(), complev() ..



data master;
input master $80.;
cards;
Adamas Pharmaceuticals, Inc.
Acacia Communications, Inc.
McHugh Inc
;
run;

data new;
input new $80.;
cards;
Adamas Pharmaceuticals, Inc.
Adimas Pharmaceuticals, Inc.
McHugh Inc
Mc Hugh innc
Mccley INC
Acacia Communications
;
run;
proc sql;
select new,count(*)/(select count(*) from master) as per format=percent8.2
 from new as a,master as b
  where a.new =* b.master
   group by a.new;
quit;

&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Aug 2016 08:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292958#M60894</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-21T08:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292960#M60895</link>
      <description>&lt;PRE&gt;
If you want all the obs of Company_New :



data master;
input master $80.;
cards;
Adamas Pharmaceuticals, Inc.
Acacia Communications, Inc.
McHugh Inc
;
run;

data new;
input new $80.;
cards;
Adamas Pharmaceuticals, Inc.
Adimas Pharmaceuticals, Inc.
McHugh Inc
Mc Hugh innc
Mccley INC
Acacia Communications
;
run;
proc sql;
select new,count(master)/(select count(master) from master) as per format=percent8.2
 from new as a left join master as b
  on a.new =* b.master
   group by a.new;
quit;


&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Aug 2016 08:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292960#M60895</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-21T08:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292967#M60896</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;%matched column thats not caluculated that i just want to show this type of output am expecting...&lt;/P&gt;
&lt;P&gt;based on the output its just dividing the count/total count,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i am expecting is ther any method that will give probability of match?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 09:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/292967#M60896</guid>
      <dc:creator>kumarK</dc:creator>
      <dc:date>2016-08-21T09:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/293007#M60902</link>
      <description>&lt;P&gt;Example of using edit distance to do some matching with function complev:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
input master &amp;amp;:$upcase80.;
cards;
Adamas Pharmaceuticals, Inc.
Acacia Communications, Inc.
McHugh Inc
;

data new;
input new &amp;amp;:$upcase80.;
cards;
Adamas Pharmaceuticals, LLC
Adamas Pharmaceuticals, Inc.
Adimas Pharmaceuticals
McHugh Inc
Mc Hugh innc
Mccley INC
Acacia Communications
;

proc sql;
create table matches as
select 
    new, master, 
    complev(new, master, 8) as complev,
    calculated complev / length(master) as distance
from 
    new inner join 
    master on substr(new,1,2) = substr(master,1,2)
where calculated complev &amp;lt; 8;
select * from matches
group by new
having distance = min(distance);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note how I divided edit distance by string length to give a relative measure of spelling error. Could be useful to filter out some matches between short names. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 19:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/293007#M60902</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-08-21T19:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/293054#M60920</link>
      <description>&lt;PRE&gt;
Sorry. I don't know what you are talking about.
How do you define that ' probability of match '?
How to calculate ' probability of match' ?
Gives us an example.
&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 08:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-names/m-p/293054#M60920</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-22T08:08:27Z</dc:date>
    </item>
  </channel>
</rss>

