dLd1 {new.dist}R Documentation

Discrete Lindley Distribution

Description

Density, distribution function, quantile function and random generation for the discrete Lindley distribution.

Usage

ddLd1(x, theta, log = FALSE)

pdLd1(q, theta, lower.tail = TRUE, log.p = FALSE)

qdLd1(p, theta, lower.tail = TRUE)

rdLd1(n, theta)

Arguments

x, q

vector of quantiles.

theta

a parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P\left[ X\leq x\right], otherwise, P\left[ X>x\right] .

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

The Discrete Lindley distribution with a parameter \theta, has density

f\left( x\right) =\frac{\lambda ^{x}}{1-\log \lambda } \left( \lambda \log\lambda +\left( 1-\lambda \right) \left( 1-\log \lambda^{x+1}\right)\right),

where

x=0,1,...,~\theta >0~and~\lambda =e^{-\theta }.

Value

ddLd1 gives the density, pdLd1 gives the distribution function, qdLd1 gives the quantile function and rdLd1 generates random deviates.

References

Gómez-Déniz, E. ve Calderín-Ojeda, E., 2011, The discrete Lindley distribution: properties and applications.Journal of statistical computation and simulation, 81 (11), 1405-1416.

Examples

library(new.dist)
ddLd1(1,theta=2)
pdLd1(2,theta=1)
qdLd1(.993,theta=2)
rdLd1(10,theta=1)

[Package new.dist version 0.1.1 Index]