LR.rod: Likelihood ratio test: Benford vs. Rodriguez family

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 a Rodriguez's generalization of Benford.

Usage

1
LR.rod(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 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.

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

rodben.ps

Examples

1
2

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