udlogarithmic function

UNU.RAN object for Logarithmic distribution

UNU.RAN object for Logarithmic distribution

Create UNU.RAN object for a Logarithmic distribution with shape parameter shape.

[Distribution] -- Logarithmic.

udlogarithmic(shape, lb = 1, ub = Inf)

Arguments

  • shape: shape parameter. Must be between 0 and 1.
  • lb: lower bound of (truncated) distribution.
  • ub: upper bound of (truncated) distribution.

Details

The Logarithmic distribution with parameters shape

=t= t has density

f(x)=log(1θ)θx/xf(x)=log(1t)tx/x f(x) = -\log(1-\theta) \theta^x / xf(x) = -log(1-t) * t^x / x

for x=1,2,x = 1, 2, \ldots and 0<t<10 < t < 1.

The domain of the distribution can be truncated to the interval (lb,ub).

Returns

An object of class "unuran.discr".

See Also

unuran.discr.

References

N.L. Johnson, S. Kotz, and A.W. Kemp (1992): Univariate Discrete Distributions. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 7, p. 285.

Author(s)

Josef Leydold and Wolfgang H"ormann unuran@statmath.wu.ac.at .

Examples

## Create distribution object for Logarithmic distribution dist <- udlogarithmic(shape=0.3) ## Generate generator object; use method DARI gen <- darid.new(dist) ## Draw a sample of size 100 x <- ur(gen,100)
  • Maintainer: Josef Leydold
  • License: GPL (>= 2)
  • Last published: 2025-04-07