BookmarkSubscribeRSS Feed
Ross12345
Calcite | Level 5

Hi,

 

Consider a retail stores credit card fee structure:
Account type = A{1,...,a}   - character
Product type = B{1,..., b}  - character 
Sub product type = C{1,..,c}   - character
Cost = D{1,...,d}    - finite number of numeric costs

 

Note that the length of B varies on the depending on the a_i in question and the length of C depends on the b_i (product type) in question.
There is a specific cost associated with a given transaction on a given account type, product type and sub product type - that varies with transaction sizes. There are bands to this pricing and my objective is to highlight anomalies in this relationship.

Bands example:
1) Transactions from $0 to $1000, we expect a fee of $10. 
2) Transactions $1001 to $2000, we expect a fee of $15. 
Anomaly in 2) could be a transaction of $900 or $2100 with a fee of $15. These anomalies could be identified through building the aforementioned loop and highlighting the top and bottom 1% of transaction sizes for the given fee amount.

 

I have struggled with building this in SAS. I have explored and tried tweaking numerous sets of code available on these forums without any luck.


Please assist / advise - or is there any easier way to approach this problem in SAS?

 

 






 

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Please provide a small (but representative) example data set following these instructions, and also please provide the desired output from this small example data set.

--
Paige Miller
ballardw
Super User

Example of what actual data looks like, as in a few rows of values similar to what you would expect to see in the process. The values need not be actual, just show the behavior. And then describe using that example how to do the actual comparison that you need.

Your descriptions don't really provide much to work with.

 

I am going to guess from the indirect description that a main challenge might be in getting a usable format.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 500 views
  • 0 likes
  • 3 in conversation