LR.dec: Likelihood ratio test: Benford vs. Decreasing probabilities

Description Usage Arguments Value References Examples

Description

LR.dec tests whether the first significant digits frequencies of a sample are compatible with Benford's Law using a likelihood ratio test with test statistic -2 logλ, where H_0: cell probabilities follow Benford's, vs. H_1: cell probabilities are decreasing, i.e. p_1 ≥ p_2 … ≥ p_9.

Usage

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

Value

The output is a list of 3 items: the likelihood ratio test statistic $LR, p-value $SL, and a convergence number $conv (0 meaning successful convergence).

The convergence number indicates convergence of the numerical method used to obtain the MLEs of the cell probabilities.

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.

Examples

1
2

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