<?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: Getting false positives when flagging for words in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340372#M9727</link>
    <description>thanks... issue is primarily finding whole word match... not sure why I am getting false positves</description>
    <pubDate>Mon, 13 Mar 2017 11:32:33 GMT</pubDate>
    <dc:creator>brulard</dc:creator>
    <dc:date>2017-03-13T11:32:33Z</dc:date>
    <item>
      <title>Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340101#M9721</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to scan a column (using base SAS) that contains notations that &amp;nbsp;agents enter when dealing with customers. The problem is that i am getting many false positives. That is, when coding a string of words to flag, I get records that flag 1, yet without the words &amp;nbsp;being in the value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using both index function and the&amp;nbsp;prxmatch function, with same result. The column that I am scanning is formatted as $2000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of my query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;set have:&lt;BR /&gt;if prxmatch("m/COUNTER|COUNTERS|CW30|REISSUE|REISSUED|STRATEGY|RE-OPEN|RE-ISSUE|APPROVE|PIN|SECURITY|TRANSACTION|TRANSACTIONS/i",column_have)&amp;gt; 0 then found=1;&lt;BR /&gt;else found=0;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a suggestion as an alternate way to flag for presence of words in given field, with better accuracy, please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 21:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340101#M9721</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-03-10T21:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340110#M9722</link>
      <description>&lt;P&gt;You should also show at least one example of the data that is incorrectly flagged.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 21:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340110#M9722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-10T21:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340112#M9723</link>
      <description>&lt;P&gt;Hi Ballardw, here is an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MDECLINED LOC INCR TO 4K$ FOR X-MAS SHOPPING, SCORE 684/3/471, EST ON BURO SINCE 1990, NO DEROGS ON BURO, DEBT RATIO HIGH, HIGHEST TRADE 18K$ ALL MAX ON OTHER TRADE, GOOD PYMT HISTORY.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 21:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340112#M9723</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-03-10T21:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340113#M9724</link>
      <description>&lt;P&gt;Assuming you issue is finding substrings instead of whole words try adding \b to signify a word boundry on both sides of your term list&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/\b(COUNTER|COUNTERS|CW30|REISSUE|REISSUED|STRATEGY|RE-OPEN|RE-ISSUE|APPROVE|PIN|SECURITY|TRANSACTION|TRANSACTIONS)\b/i&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Mar 2017 21:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340113#M9724</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2017-03-10T21:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340117#M9725</link>
      <description>&lt;P&gt;You can use alternative way.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _NULL_;
     column_have = "MDECLINED LOC INCR TO 4K$ FOR X-MAS SHOPPING, SCORE 684/3/471, EST ON BURO SINCE 1990, NO DEROGS ON BURO, DEBT RATIO HIGH, HIGHEST TRADE 18K$ ALL MAX ON OTHER TRADE, GOOD PYMT HISTORY.";
     chk_for ="COUNTER|COUNTERS|CW30|REISSUE|REISSUED|STRATEGY|RE-OPEN|RE-ISSUE|APPROVE|PIN|SECURITY|TRANSACTION|TRANSACTIONS";
     do i=1 to 50;
        word = scan(chk_for,i,'|');
        if word = ' ' then leave;
        pos = findw(column_have,word); put word= pos=; 
     end;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;none of the words in chk_for variable were found. All have position 0.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 21:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340117#M9725</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-10T21:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340131#M9726</link>
      <description>thanks for the tip... i ll try it on Monday</description>
      <pubDate>Fri, 10 Mar 2017 23:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340131#M9726</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-03-10T23:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340372#M9727</link>
      <description>thanks... issue is primarily finding whole word match... not sure why I am getting false positves</description>
      <pubDate>Mon, 13 Mar 2017 11:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340372#M9727</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-03-13T11:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting false positives when flagging for words</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340481#M9728</link>
      <description>&lt;P&gt;ok, I think i figured it out. The result I was getting, not true false postives... but is the result of my string |PIN| which flagged word SHOPPING. To avoid hitting this, i could add a space before and after, | PIN |. So i think this closes this message&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Getting-false-positives-when-flagging-for-words/m-p/340481#M9728</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-03-13T16:40:26Z</dc:date>
    </item>
  </channel>
</rss>

