quaben: Quantile Function of the Benford Distribution

quabenR Documentation

Quantile Function of the Benford Distribution

Description

This function computes the quantiles of the Benford distribution (Benford's Law) given parameter defining the number of first M-significant figures and the numeric base. The quantile function has no analytical form and summation of the probability mass function (to form the cumulative distribution function, see also cdfben) is used with clever use of the cut() function.

Usage

quaben(f, para=list(para=c(1, 10)), ...)

Arguments

f

Nonexceedance probability (0 \le F \le 1).

para

The number of the first M-significant digits followed by the numerical base (only base10 supported) and the list structure mimics similar uses of the lmomco list structure. Default are the first significant digits and hence the digits 1 through 9.

...

Additional arguments to pass (not likely to be needed but changes in base handling might need this).

Value

Quantile value for nonexceedance probability F.

Author(s)

W.H. Asquith

References

Benford, F., 1938, The law of anomalous numbers: Proceedings of the American Philosophical Society, v. 78, no. 4, pp. 551–572, https://www.jstor.org/stable/984802.

Goodman, W., 2016, The promises and pitfalls of Benford’s law: Significance (Magazine), June 2015, pp. 38–41, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1740-9713.2016.00919.x")}.

See Also

cdfben, pmfben

Examples

para <- list(para=c(1, 10))
quaben(    cdfben(  5, para=para) , para=para) # 5
quaben(sum(pmfben(1:5, para=para)), para=para) # 5

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.