EconPapers    
Economics at your fingertips  
 

FIRSTDIGIT: Stata module to analyse first digits of numeric variables

Nicholas Cox ()

Statistical Software Components from Boston College Department of Economics

Abstract: firstdigit tabulates and analyses the first digits of numeric variables. It also tests Benford's law that digits d = 1,..,9 occur with probabilities log10(1 + 1/d). Thus given data of 12, 345, 6789, etc., it would extract 1, 3, 6, etc., tabulate the frequencies of the digits 1 to 9 and give a chi-square test of the law.

Language: Stata
Requires: Stata version 9.1
Keywords: digits; Benford's Law; fraud; data cleaning (search for similar items in EconPapers)
Date: Written 2007-05-23
Note: This module may be installed from within Stata by typing "ssc install firstdigit". Windows users should not attempt to download these files with a web browser.

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/f/firstdigit.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/f/firstdigit.hlp help file (text/plain)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics
Address: Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA
Contact information at EDIRC.
Series data maintained by Christopher F Baum ().

 
Page updated 2008-10-05
Handle: RePEc:boc:bocode:s456842