Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Benford's Law


From   "Michael Levitan" <michael.levitan@villanova.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Benford's Law
Date   Wed, 30 Nov 2005 09:28:32 -0500

Al,

    Thanks so much for your quick and excellent response.

                      Michael

FEIVESON, ALAN H. (AL) (JSC-SK311) (NASA) wrote:

If your "entry" is a real number not begining with "." or "-" you can do

gen k = real(substr(string(x),1,1)
Al Feiveson


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Michael Levitan
Sent: Wednesday, November 30, 2005 8:08 AM
To: Statalist
Subject: st: Benford's Law

Hi,

Does anyone have an easy way to identify the leading digit for each
entry in a diverse data set other than a series of inequality filters?

Thanks,
Michael
*
* 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/
*
* 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/

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index