Relative Size Factor Test (RSF) - Updated Oct 24, 2012

Background: 

The purpose of the Relative Size Factor test (RSF) IDEAScript is to identify anomalies where the largest amount for subsets in a given key is outside the norm for those subsets. This test compares the top two amounts for each subset and calculates the RSF for each. The RSF test is based on Chapter 11 of Mark J. Nigrini’s book, entitled, “Forensic Analytics: Methods and Techniques for Forensic Accounting Investigations”. Utilizing the largest and the second largest amount to calculate a ratio based on purchases which are grouped by vendors, in order to identify potential fraudulent activities in invoice payment data, has often been suggested in fraud examination literature. One such reference is the, “Principles of Fraud Examination” written by Joseph T. Wells.

I have added a second version in which the final files now contain an action field that links back to the original file.  When using this remember that the action field opens up all the transactions whereas the RSF test only looks at positive or negative values so there could be a difference in the number of transactions.  (July 19, 2013) Unfortunately it seems that IDEA has removed the action field link functionality from V9, so the updated script will only work in V8 of the software.  I hope to get IDEA to reconsider and place this function back in future versions of IDEA.

Documentation: 

 

The purpose of the Relative Size Factor test (RSF) IDEAScript is to identify anomalies where the largest amount for subsets in a given key is outside the norm for those subsets. This test compares the top two amounts for each subset and calculates the RSF for each.  The RSF test is based on Chapter 11 of Mark J. Nigrini’s book, entitled, “Forensic Analytics: Methods and Techniques for Forensic Accounting Investigations”. [1]

Utilizing the largest and the second largest amount to calculate a ratio based on purchases which are grouped by vendors, in order to identify potential fraudulent activities in invoice payment data, has often been suggested in fraud examination literature. One such reference is the, “Principles of Fraud Examination” written by Joseph T. Wells.[2]

In chapter 11 of Dr. Mark Nigirini’s Forensic Analytics book, he introduces the RSF test which expands on this concept and states, “In this chapter we compare large amounts to a benchmark to see how large they are relative to some norm, hence the name the relative size factor test. The relative size factor test is a powerful test for detecting errors. The test identifies subsets where the largest amount is out of line with the other amounts for that subset. This difference could be because the largest record either (a) actually belongs to another subset, or (b) belongs to the subset in question, but the numeric amount is incorrectly recorded. The relative size factor (RSF) test is an important error-detecting test.”

 Largest Record in a Subset

 Relative Size Factor =         --------------------------------------------------

       Second Largest Record in a Subset

Subsets in a data file are identified as “Keys” in IDEA.  An example would be vendors in an Accounts Payable file. The test identifies records that are outliers to the rest of the amounts within the subset groups. Outliers may not be the largest amounts in the entire dataset but are large in respects to particular members of the subset. Large differences might be attributed to errors such as the record belongs to another subset or that the amount was posted incorrectly (e.g., shifted decimal point). Large differences may also be an indication of fraudulent activity, such as occupational accounts payable fraud, falsified invoices for HST input tax credits, offset money laundering revenue, or product sales to related companies (offshore transfer pricing). Dr. Mark Nigrini in his book discusses the forensic results regarding investigations of sales numbers, insurance claim payments, inventory numbers, and health care claims using the RSF test.

 

The IDEAScript allows the user to select either positive or negative amounts in a dataset to which the RSF test can be applied. The first step is to select the file to be tested. Files from within the current IDEA working folder are presented as options. The second step is to select the subset or key field. The third and final step is to identify the numeric amount field for purposes of the RSF ratio calculation.

If there is a field in the file that describes the key, the “Optional description field for the key field” may be selected to include this field in the output.

 

Once the script is executed, subset members that have only a single transaction are eliminated.  The test results are captured in a data file named, “RSF Test – Original Filename” which contains the fields Subset/Key, optional selected field, Largest_Amt, Second_Largest _Amt, Average_X_Largest, Count, and Relative_Size_Factor. The user can then extract records that exceed a determined RSF for further examination. The selection of the review threshold for the RSF ratio may be determined by the audit plan or by the professional judgement of the user. 

Note: The Average_X_Largest field is the average of all positive or negative (as selected by the user prior to running the script) amounts excluding the largest amount. This field provides an indication of the “typical” amount within the subset members. Currently, creating an action field linking to the records in the selected file is not supported within IDEAScript. You may manually create it by selecting Data, Define Action Field, Create Action Link to display extraction preview, and the original file.

If there are fifty or less subset members, then a chart is created for all the subset members. If there are more than fifty, then the fifty highest RSF ratios are charted. A file with the fifty extractions is also created.

 

To display all the transactions within the chart view, click on “Data” in the “Properties” window located on the right. To return to the chart view, click on “Relative Size Factor Test” (from within the “Properties” window, “Results” area)”.



[1] Nigrini, Mark J., Forensic Analytics: Methods and Techniques for Forensic Accounting Investigations, New Jersey: John Wiley & Sons, Inc., 2011: Print

[2] Wells, Joseph T., Principles of Fraud Examination, 3rd Edition,  New Jersey: John Wiley & Sons, Inc., 2011: Print

Comments

Stedemi's picture

It gives "unspecified error" at line 585. Probably due to my Unicode version of I9
 

Brian Element's picture

I am sorry to hear that.  Unfortunately I don't have access to the Unicode version.  Which script where you using?  Line 585 seems to be in a routine where I am getting the filename.  Can you send me a screen grab of the code where the error is showing (brian.element@ideascripting.com), also if you could let me know at what point the script stops that could be helpful, such as is it after the dialog, once the anaylsis starts, etc.  Maybe I can get the script working for you.

Thanks

Stedemi's picture

Hi Brian,
I have replied to your email address. In a nutshell, it seems that the first test (April 2012) cannot be run twice on the same set of data unless you delete the index
The other file gives an error close to the end of the routine
Many thanks
Stefano

Brian Element's picture

Thanks, I received your email and with the information I should be able to fix the problem.  I will post when I have updated the code.

Hi Brian,

I was demonstarting this script last week after not using it for a while and recalled that my first step after it's completion is to create an action filed in the top 50 output data file back to the original file. Now that you know how to add action fields to IDEAScripts, can this be added to enhance the rountine.

Brian Element's picture

Hi Steve,

It already has, see above there is one version with the action field and one without.  Let me know how it goes.

Brian

 
HI Brian,
Is there an updated version of the RSF test that can be ran with V9 or higher?   Thanks.  Tim 
 

Brian Element's picture

Hi Timothy,

The first link above the one for V8 should work in V9 and 10.  I also have it as part of my SmartAnalyzer app that I have a link for on the main page.

Brian