Test by Data Stratification
Test by Data Stratification Benford's Law Fraud detectionDownloads First digits lawSite Map
Home Page | Population | Sampling | Fraud | Other | Tutorial | Macros
Test by Data Stratification
Macro CodeDescription of Function
Sub RunByStrata()
'
' run the Strata report by the specified sort keys
'
Dim oEZ As New cEZ
oEZ.AnalyzeStrata _
Infile:=BASEDIR & "clmdensp.srt", _
Report:=BASEDIR & "clmdensp.str", _
SortKeys:="billprov + a", _
Column:="paidamt", _
Strata:="0 10 20 30 40 50 60 70 80 100"

' macro to load a report file to a worksheet
LoadSheet _
ToSheet:="$Debug", _
Infile:=BASEDIR & "clmdensp.str"

Set oEZ = Nothing
End Sub

Data Stratification procedures.

This procedure first stratifies the entire population using the strata specified, and then stratifies each sub-group of the population using the same strata. The file must be sorted. The procedure takes five parameters as follows:

  • Infile - name of the (sorted) input file
  • Report - name of the file to contain the report generated
  • SortKeys - specifies how the input file is sorted
  • Column - the name of the numeric column to be used for the stratification
  • Strata - a list of numeric values in ascending order used to stratify the amounts

The procedure on the left first runs the stratification analysis and then loads the report generated onto the sheet named $Debug. Note that if the worksheet doesn't exist, then it will be created.

Complete Auditor resources
Links | Privacy Policy | FAQ | Downloads | Trademarks
Web Page last updated on 04-20-2008
© EZ-R Stats, LLC 2005-2007