dLd2 {new.dist}R Documentation

Discrete Lindley Distribution

Description

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

Usage

ddLd2(x, theta, log = FALSE)

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

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

rdLd2(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+\theta } \left( \theta \left(1-2\lambda \right) +\left( 1-\lambda \right) \left( 1+\theta x\right)\right),

where

x=0,1,2,...~,\lambda =\exp \left( -\theta \right) ~and~\theta >0.

Value

ddLd2 gives the density, pdLd2 gives the distribution function, qdLd2 gives the quantile function and rdLd2 generates random deviates.

References

Bakouch, H. S., Jazi, M. A. ve Nadarajah, S., 2014, A new discrete distribution, Statistics, 48 (1), 200-240.

Examples

library(new.dist)
ddLd2(2,theta=2)
pdLd2(1,theta=2)
qdLd2(.5,theta=2)
rdLd2(10,theta=1)

[Package new.dist version 0.1.1 Index]