One-Parameter Discrete Lindley Distribution

Description

Probability mass function, distribution function, quantile function and random number generation for the one-parameter discrete Lindley distribution with parameter theta.

Usage

1
2
3
4
5
6
7
ddlindley(x, theta, log = FALSE)

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

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

rdlindley(n, theta)

Arguments

x, q

vector of integer positive quantiles.

theta

positive parameter.

log, log.p

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

lower.tail

logical; If TRUE, (default), P(X ≤q x) are returned, otherwise P(X > x).

p

vector of probabilities.

n

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

Details

Probability mass function

P≤ft( X=x\mid θ \right) =∑\limits_{i=0}^{1}≤ft( -1\right) ^{i}≤ft( 1+\frac{θ }{1+θ }≤ft( x+i\right) \right) e^{-θ ≤ft( x+i\right) }

Value

ddlindley gives the probability mass function, pdlindley gives the distribution function, qdlindley gives the quantile function and rdlindley generates random deviates.

Invalid arguments will return an error message.

Author(s)

Josmar Mazucheli jmazucheli@gmail.com

Larissa B. Fernandes lbf.estatistica@gmail.com

Source

[d-p-q-r]dlindley are calculated directly from the definitions. rdlindley uses the discretize values.

References

Bakouch, H. S., Jazi, M. A. and Nadarajah, S. (2014). A new discrete distribution. Statistics: A Journal of Theoretical and Applied Statistics, 48, 1, 200-240.

Gomez-Deniz, E. and Calderín-Ojeda, E. (2013). The discrete Lindley distribution: properties and applications. Journal of Statistical Computation and Simulation, 81, 11, 1405-1416.

See Also

Lindley.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1)
x <- rdlindley(n = 1000, theta = 1.5)
plot(table(x) / sum(table(x)))
points(unique(x),ddlindley(unique(x), theta = 1.5))

## fires in Greece data (from Bakouch et al., 2014)
data(fires)
library(fitdistrplus)
fit <- fitdist(fires, 'dlindley', start = list(theta = 0.30), discrete = TRUE)
gofstat(fit, discrete = TRUE)
plot(fit)