carloscinelli / benford.analysis

Tools that make it easier to use Benford’s law for data validation and forensic analytics.
61 stars 15 forks source link

Meaning of number.of.digits in case of non-discreate numbers #13

Closed hannes101 closed 7 years ago

hannes101 commented 7 years ago

Hi Carlos,

thanks a lot for this package, it's really useful! I am asking about the meaning of this option, since I am not sure what exactly it means. I am analysing interest rate data and thus I am not sure what exactly it means, that in the documentation it states that "number.of.digits" defines how many first digits to analyse. Does it care about the decimal separator of a numeric value or does it just take the number in as it is, like 035 for an interest rate of 0.35%?

Thanks a lot for some clarification

carloscinelli commented 7 years ago

Hi, hannes!

No, the decimal separator does not matter. So, for instance, 0.35 is for all purposes 35. Which means the first valid digit is 3 and the second valid digit is 5.

The number of digits argument tells to the function whether you want to analyze the pattern of only the first digits or the first and second digits together.