Thursday, March 16, 2006
st: New package for digit preference analysis on SSC
A new package 'digits' has been made available on SSC and is also available via my homepage. The package contains three functions written to help with exploring the patterns of middle and terminal digit preferences.
Briefly: digit: is an egen extension function that generates a new variable containing the digits extracted from a certain decimal place of an existing variable.
digituse: cross-tablulates all digits against each decimal place to provide a succinct overview of digit preferences in a variable.
zerouse: cross-tabulates and saves a 'mask' variable highlighting the patterns in which a particular digit appears within a variable. This would typically be used to examine zero preference (hence 'zerouse') but you can tell the function which digit to treat as the special one.
For further information 'ssc describe digits' or visit http://www.richardatkins.co.uk/statistics/statabits.htm which has html versions of the helpfiles including examples of each function in use.
Richard J. Atkins Department of Epidemiology and Population Health London School of Hygiene and Tropical Medicine Keppel Street, London WC1E 7HT E-mail: email@example.com Homepage: http://www.lshtm.ac.uk/ncdeu/staff/ratkins.html
Tel: 020 7927 2968
* * 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/
Links to this post: