LR.genben: Likelihood ratio test: Benford vs. Generalized Benford

Description Usage Arguments Details Value References See Also Examples

Description

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 generalized Benford.

Usage

1
LR.genben(frequencies, digits = 1:9)

Arguments

frequencies

Vector of multinomial frequencies.

digits

A significant digits vector. If unspecified, default is 1:9. digits must match the frequencies frequencies.

Details

The generalized Benford's law depends upon parameter α. Because the generalized Benford's law reduces to Benford's law when α = 0, equivalent hypotheses for this test are H_0: α = 0 vs. H_1: α =/= 0.

Value

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 α.

References

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.

See Also

genben.ps

Examples

1
2

mlespera/BenGood documentation built on May 18, 2019, 3:43 p.m.