Description Usage Arguments Details Value References See Also Examples
LR.genben
tests whether the first significant digits frequencies of a
sample are compatible with Benford's Law using a likelihood ratio test, where
H_0: cell probabilities follow Benford's, vs. H_1:
cell probabilities follow a Rodriguez's generalization of Benford.
1 | LR.rod(frequencies, digits = 1:9)
|
frequencies |
Vector of multinomial frequencies. |
digits |
A significant digits vector. If unspecified, default is 1:9. |
The Rodriguez formula depends upon parameter β. Because the Rodriguez formula reduces to Benford's law when β = -1, equivalent hypotheses for this test are H_0: β = -1 vs. H_1: β =/= -1.
The output is a list containing a p-value $SL
and a
convergence number $conv
(0 meaning successful convergence)
respectively.
The convergence number indicates convergence of the numerical method used to obtain the MLE of α.
Lesperance M, Reed WJ, Stephens MA, Tsao C, Wilton B (2016) Assessing conformance with Benford's Law: goodness-of-fit tests and simultaneous confidence intervals. PLoS one; 11(3). Wong, S. (2010) Testing Benford's Law with the first two significant digits. University of Victoria, Master's thesis.
1 2 | set.seed(123)
LR.rod((firstdigitsfreq(rnorm(100), 1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.