Skip to contents

Density, distribution function, quantile function and random generation for the EP distribution.

Usage

dEPd(x, lambda, beta, log = FALSE)

pEPd(q, lambda, beta, lower.tail = TRUE, log.p = FALSE)

qEPd(p, lambda, beta, lower.tail = TRUE)

rEPd(n, lambda, beta)

Arguments

x, q

vector of quantiles.

lambda, beta

are parameters.

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.

Value

dEPd gives the density, pEPd gives the distribution function, qEPd gives the quantile function and rEPd generates random deviates.

Details

The EP distribution with parameters \(\lambda\) and \(\beta\), has density $$f\left( x\right) =\frac{\lambda \beta } {\left( 1-e^{-\lambda }\right) } e^{-\lambda -\beta x+\lambda e^{-\beta x}},$$ where $$x>\mathbb{R}_{+},~\beta ,\lambda \in \mathbb{R}_{+}.$$

References

Kuş, C., 2007, A new lifetime distribution, Computational Statistics & Data Analysis, 51 (9), 4497-4509.

Examples

library(new.dist)
dEPd(1, lambda=2, beta=3)
#> [1] 0.05165063
pEPd(1,lambda=2,beta=3)
#> [1] 0.9836125
qEPd(.8,lambda=2,beta=3)
#> [1] 0.295895
rEPd(10,lambda=2,beta=3)
#>  [1] 1.29875909 0.01150784 0.48567335 0.01543956 0.16502219 0.36704264
#>  [7] 0.17057096 0.16085664 0.50439068 0.71893609