Thanks to Kit Baum, a new -digdis- package is available from the SSC
Archive. Stata 9 or Stata 10 is required.
-digdis- is a module to analyze the distribution of digits. It
tabulates the distribution of digits of the specified variables,
performs goodness-of-fit tests against a reference distribution and,
optionally, graphs the distributions. The default is to tabulate the
first (nonzero) digit and to test against Benford's law.
Other packages for digits analysis have been released on SSC recently
(-firstdigit-, -benford-). The -digdis- module has been developed
independently.
Some highlights of -digdis-:
o string variables are supported
o other digits than the first may be tabulated (up to sixth)
o exact tests for small samples are provided (via the -mgof- package)
o the test distribution may be Benford, uniform or any user specified
distribution
o graphs, including confidence intervals, may be plotted
To install the package, type
. ssc install digdis
Note that the newest -moremata- version is required. Type
. ssc install moremata, replace
Furthermore, the -mgof- package is required. Type
. ssc install mgof
ben
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/