<?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: Binning the aligned suspicion score in a dataset of bank customers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950271#M371626</link>
    <description>&lt;P&gt;Thank you very much for the detailed response. The solution you provide is very straightforward. Regarding the amount, it is the minimum amount of suspicion, so yes, £3500&amp;nbsp;&lt;STRONG&gt;and above.&amp;nbsp;&lt;/STRONG&gt;Regarding now the brackets, let me correct it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[min,495)&lt;/P&gt;&lt;P&gt;[495,600)&lt;/P&gt;&lt;P&gt;[600,700]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Nov 2024 00:05:12 GMT</pubDate>
    <dc:creator>mvalsamis</dc:creator>
    <dc:date>2024-11-09T00:05:12Z</dc:date>
    <item>
      <title>Binning the aligned suspicion score in a dataset of bank customers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950267#M371624</link>
      <description>&lt;P&gt;Good evening! I am working on the following project. I have a large database of bank customers, each of which is assigned with an aligned suspicion score (ALSS). Under the current rule, if a customer has an ALSS of 495 and above, &lt;STRONG&gt;and&amp;nbsp;&lt;/STRONG&gt;receives total cash of £3500, is considered suspicious to commit financial fraud.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do now is to retune the ALSS all the way up to the maximum value, 700. To do so, I need to bin the values as follows:&lt;/P&gt;&lt;P&gt;[min,495]&lt;/P&gt;&lt;P&gt;(495,600]&lt;/P&gt;&lt;P&gt;(600,700]&lt;/P&gt;&lt;P&gt;The total cash received must remain constant in 3500 pounds.&lt;/P&gt;&lt;P&gt;I don't know how to do this in SAS. I am carrying out research on it, nut I would appreciate if anyone could assist me. Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 23:26:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950267#M371624</guid>
      <dc:creator>mvalsamis</dc:creator>
      <dc:date>2024-11-08T23:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Binning the aligned suspicion score in a dataset of bank customers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950269#M371625</link>
      <description>&lt;P&gt;First I think we may need to clarify your () and [] usage. Normally the [ or ] on an interval means that the end point is included in the interval and ( or ) means the end point is not included. So [min,495] would mean that 495 is included in the range. Which does not quite match your description of "ALSS of 495 and above" which would mean an interval like [495, xxx ] .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, what is the difference in output for the three ranges (assuming you mean something more like)&lt;/P&gt;
&lt;P&gt;[min,495)&lt;/P&gt;
&lt;P&gt;[495,600]&amp;nbsp; (and clarify which interval 600 should be in)&lt;/P&gt;
&lt;P&gt;(600,700]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that you mean "&lt;STRONG&gt;and&amp;nbsp;&lt;/STRONG&gt;receives total cash of &lt;STRONG&gt;at least &lt;/STRONG&gt;£3500" . Otherwise only one value for cash seems like a poor rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is where I think you may want to start. This assumes you have a data set named HAVE. Replace Have with the name of your data set. Replace WANT with the name you want to use for the output.&lt;/P&gt;
&lt;P&gt;This assumes the value of cash is in a variable named CASH. If your variable has a different name then use that. Also assumes the score is in a variable named ALSS.&lt;/P&gt;
&lt;P&gt;You do not mention any rule for what to do when cash does not exceed that minimum (assumed) value.&lt;/P&gt;
&lt;P&gt;In the code below GE means&amp;nbsp; "greater than or equal", LT is "less than" and LE is "less than or equal". I use these versions instead of symbols because I have used keyboards that have issues with some of the comparison characters. I have assigned three values to a variable named Bin in the order you presented ranges.&lt;/P&gt;
&lt;P&gt;The IF for the Cash value shown with the indentation between DO and END means the bins are only assigned when the cash value is greater than or equal to 3500. I have to assume your currency is in the correct units and is numeric.&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   if cash ge 3500 then do;
      if 0 le ALSS lt 495 then bin=1;
      else if 495 le ALSS lt 600 then bin=2 ;
      else if 600 lt ALSS then bin=3;
   end;

run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2024 23:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950269#M371625</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-11-08T23:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Binning the aligned suspicion score in a dataset of bank customers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950271#M371626</link>
      <description>&lt;P&gt;Thank you very much for the detailed response. The solution you provide is very straightforward. Regarding the amount, it is the minimum amount of suspicion, so yes, £3500&amp;nbsp;&lt;STRONG&gt;and above.&amp;nbsp;&lt;/STRONG&gt;Regarding now the brackets, let me correct it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[min,495)&lt;/P&gt;&lt;P&gt;[495,600)&lt;/P&gt;&lt;P&gt;[600,700]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2024 00:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Binning-the-aligned-suspicion-score-in-a-dataset-of-bank/m-p/950271#M371626</guid>
      <dc:creator>mvalsamis</dc:creator>
      <dc:date>2024-11-09T00:05:12Z</dc:date>
    </item>
  </channel>
</rss>

