Last data update: 2014.03.03

R: Exponentiated Power Lindley Distribution
EXPPLindleyR Documentation

Exponentiated Power Lindley Distribution

Description

Density function, distribution function, quantile function, random number generation and hazard rate function for the exponentiated power Lindley distribution with parameters theta, alpha and beta.

Usage

dexpplindley(x, theta, alpha, beta, log = FALSE)

pexpplindley(q, theta, alpha, beta, lower.tail = TRUE, log.p = FALSE)

qexpplindley(p, theta, alpha, beta, lower.tail = TRUE, log.p = FALSE)

rexpplindley(n, theta, alpha, beta)

hexpplindley(x, theta, alpha, beta, log = FALSE)

Arguments

x, q

vector of positive quantiles.

theta, alpha, beta

positive parameters.

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 density function

f(xmid θ,α,β )={frac{β α θ ^{2}}{1 + θ}}(1+x^{α })x^{α -1}e^{-θ x^{α }}≤ft[ 1-≤ft( 1+{frac{θ x^{α }}{1 + θ}} ight) e^{-θ x^{α }} ight]^{β -1}

Cumulative distribution function

F(xmid θ,α,β )=≤ft[ 1-≤ft( 1+{frac{θ x^{α }}{1 + θ}} ight) e^{-θ x^{α }} ight] ^{β }

Quantile function

Q(pmid θ ,α ,β )=≤ft( -1-frac{1}{θ }-frac{1}{θ }W_{-1}≤ft( ≤ft( 1+θ ight) ≤ft( p^{frac{1}{β }}-1 ight)e^{-≤ft( 1+θ ight) } ight) ight) ^{frac{1}{α }}

Hazard rate function

h(xmidθ,α,β )={frac{β α θ ^{2}(1+x^{α })x^{α -1}e^{-θ x^{α }}≤ft[ 1-≤ft( 1+{frac{θ x^{α }}{θ+1}} ight) e^{-θ x^{α }} ight] ^{β -1}}{≤ft( θ +1 ight) ≤ft{ 1-≤ft[ 1-≤ft( 1+{frac{θ x^{α }}{1 + θ}} ight) e^{-θ x^{α }} ight] ^{β } ight} }}

where W_{-1} denotes the negative branch of the Lambert W function.

Particular cases: α = 1 the exponentiated Lindley distribution, β = 1 the power Lindley distribution and (α = 1, β = 1) the one-parameter Lindley distribution. See Warahena-Liyanage and Pararai (2014) for other particular cases.

Value

dexpplindley gives the density, pexpplindley gives the distribution function, qexpplindley gives the quantile function, rexpplindley generates random deviates and hexpplindley gives the hazard rate function.

Invalid arguments will return an error message.

Note

Warahena-Liyanage and Pararai (2014) named the exponentiated power Lindley distribution as generalized power Lindley distribution.

Author(s)

Josmar Mazucheli jmazucheli@gmail.com

Larissa B. Fernandes lbf.estatistica@gmail.com

Source

[d-h-p-q-r]expplindley are calculated directly from the definitions. rexpplindley uses the quantile function.

References

Ashour, S. K., Eltehiwy, M. A., (2015). Exponentiated power Lindley distribution. Journal of Advanced Research, 6, (6), 895-905.

Warahena-Liyanage, G., Pararai, M., (2014). A generalized power Lindley distribution with applications. Asian Journal of Mathematics and Applications, 2014, 1-23.

See Also

lambertWm1.

Examples

set.seed(1)
x <- rexpplindley(n = 1000, theta = 11.0, alpha = 5.0, beta = 2.0)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.01)
plot(S, dexpplindley(S, theta = 11.0, alpha = 5.0, beta = 2.0), xlab = 'x', ylab = 'pdf')
hist(x, prob = TRUE, main = '', add = TRUE)

p <- seq(from = 0.1, to = 0.9, by = 0.1)
q <- quantile(x, prob = p)
pexpplindley(q, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = TRUE)
pexpplindley(q, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = FALSE)
qexpplindley(p, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = TRUE)
qexpplindley(p, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = FALSE)

## bladder cancer data (from Warahena-Liyanage and Pararai, 2014)
data(bladdercancer)
library(fitdistrplus)
fit <- fitdist(bladdercancer, 'expplindley', start = list(theta = 1, alpha =  1, beta = 1))
plot(fit)


Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LindleyR)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LindleyR/EXPPLindley.Rd_%03d_medium.png", width=480, height=480)
> ### Name: EXPPLindley
> ### Title: Exponentiated Power Lindley Distribution
> ### Aliases: EXPPLindley dexpplindley hexpplindley pexpplindley
> ###   qexpplindley rexpplindley
> 
> ### ** Examples
> 
> set.seed(1)
> x <- rexpplindley(n = 1000, theta = 11.0, alpha = 5.0, beta = 2.0)
> R <- range(x)
> S <- seq(from = R[1], to = R[2], by = 0.01)
> plot(S, dexpplindley(S, theta = 11.0, alpha = 5.0, beta = 2.0), xlab = 'x', ylab = 'pdf')
> hist(x, prob = TRUE, main = '', add = TRUE)
> 
> p <- seq(from = 0.1, to = 0.9, by = 0.1)
> q <- quantile(x, prob = p)
> pexpplindley(q, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = TRUE)
      10%       20%       30%       40%       50%       60%       70%       80% 
0.1050439 0.2012327 0.3119572 0.3977886 0.4832594 0.5960066 0.7060999 0.7969307 
      90% 
0.9100919 
> pexpplindley(q, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = FALSE)
      10%       20%       30%       40%       50%       60%       70%       80% 
0.8949561 0.7987673 0.6880428 0.6022114 0.5167406 0.4039934 0.2939001 0.2030693 
      90% 
0.0899081 
> qexpplindley(p, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = TRUE)
[1] 0.5189585 0.5670922 0.6010541 0.6295371 0.6557034 0.6814304 0.7084771
[8] 0.7395176 0.7815006
> qexpplindley(p, theta = 11.0, alpha = 5.0, beta = 2.0, lower.tail = FALSE)
[1] 0.7815006 0.7395176 0.7084771 0.6814304 0.6557034 0.6295371 0.6010541
[8] 0.5670922 0.5189585
> 
> ## bladder cancer data (from Warahena-Liyanage and Pararai, 2014)
> data(bladdercancer)
> library(fitdistrplus)
Loading required package: MASS
> fit <- fitdist(bladdercancer, 'expplindley', start = list(theta = 1, alpha =  1, beta = 1))
> plot(fit)
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>