Last-Two
Digits
Last_two.sas provides a complete analysis (in the same format as
Digitnum.sas) of the last-two digit frequencies.
The Last-two digits test is discussed in the Summary.
The setup lines are
as follows:
filename analyze 'c:\Testdata\census1990.txt'
;
***********************************************;
*Program
Options
;
***********************************************;
options nocenter
;
***********************************************;
*This
test is intended for positive integers
;
*equal
to 10.00 and higher
;
*Program
will strip away all digits to the
;
*right
of the decimal point and will delete all;
*numbers
less than 10.00.
***********************************************;
***********************************************;
*Read
Data File and Print First Page
;
***********************************************;
data
one
;
infile analyze delimiter=',' dsd
;
input field
;
if field lt 10 then delete
;
field
= int(field)
;
keep field
;
run
;
This test is not usually appropriate for dollars and cents and
consequently the test file for Last_two.sas
is census data from the TestData directory.
If users want to analyze dollars and cents a solution would be to
multiply all the numbers in field
by 100.
The field=int(field) line
essentially strips all digits to the right of the decimal point from the
numbers. The last-two
digits are forced to be the tens and units amounts of any number.
The output graph is in the
rough format of SAS/Base graphs. Users
can export the counts to Excel by using the ToExcel.sas
routine and inserting it in the Last-Two.sas
program
The output includes an
Audit Target Summary. This
table lists the last-two digit combinations in the order of descending
Z-statistics. The last-two
digit combinations at the top of the Table have the highest level of
deviations from the expected proportions.
Round
Numbers
Roundnum.sas provides a complete analysis of the proportions of
the numbers that are round numbers.
Round numbers are those numbers divisible by 10, 25, 100, and
1000 without leaving a remainder. The
Round Numbers test is discussed in the Summary.
The setup lines are
as follows:
filename analyze 'c:\Testdata\census1990.txt' ;
***********************************************;
*Program Options
;
***********************************************;
options nocenter
;
***********************************************;
*This test is intended for positive
integers ;
*equal to 10.00 and higher
;
*Program will strip away all digits to
the ;
*right of the decimal point and will
delete all;
*numbers
less than 10.00.
***********************************************;
***********************************************;
*Read Data File and Print First Page
;
***********************************************;
data one
;
infile analyze delimiter=',' dsd
;
input field
;
if field lt 10 then delete ;
field
= int(field)
;
keep field
;
run
;
This test is not usually appropriate for dollars and cents and
consequently the test file for Roundnum.sas
is census data from the TestData directory.
If users want to analyze dollars and cents a solution would be to
multiply all the numbers in field
by 100.
The field=int(field) line
essentially strips all digits to the right of the decimal point from the
numbers. This means that
numbers such as 700.00 and 700.64 would both be calculated to be
multiples of 100.