K_S_benford
takes any numerical vector reduces the sample to the specified number of significant digits and performs the Kolmogorov-Smirnov goodness-of-fit test to assert if the data conforms to Benford's law.K_S_benford(x = NULL, first_digits = 1, pvalmethod = "simulate", pvalsims = 10000)
"simulate"
is available.pvalmethod = "simulate"
.leading_digits(x,first_digits)
and
pbenf(first_digits)
. x
is a numeric vector of arbitrary length. Values of x
should be continuous, as dictated by theory, but may also be integers.
first_digits
should be chosen so that leading_digits(x,first_digits)
is not influenced by previous rounding.pbenf