Package 'LindleyPowerSeries'

Title: Lindley Power Series Distribution
Description: Computes the probability density function, the cumulative distribution function, the hazard rate function, the quantile function and random generation for Lindley Power Series distributions, see Nadarajah and Si (2018) <doi:10.1007/s13171-018-0150-x>.
Authors: Saralees Nadarajah & Yuancheng Si, Peihao Wang
Maintainer: Yuancheng Si <[email protected]>
License: GPL (>= 2)
Version: 1.0.1
Built: 2025-02-11 02:55:45 UTC
Source: https://github.com/cran/LindleyPowerSeries

Help Index


LindleyBinomial

Description

distribution function, density function, hazard rate function, quantile function, random number generation

Usage

plindleybinomial(x, lambda, theta, m, log.p = FALSE)

dlindleybinomial(x, lambda, theta, m)

hlindleybinomial(x, lambda, theta, m)

qlindleybinomial(p, lambda, theta, m)

rlindleybinomial(n, lambda, theta, m)

Arguments

x

vector of positive quantiles.

lambda

positive parameter

theta

positive parameter.

m

number of trails.

log.p

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

p

vector of probabilities.

n

number of observations.

Details

Probability density function

f(x)=θλ2(λ+1)A(θ)(1+x)exp(λx)A(ϕ)f(x)=\frac{\theta\lambda^2}{(\lambda+1)A(\theta)}(1+x)exp(-\lambda x)A^{'}(\phi)

Cumulative distribution function

F(x)=A(ϕ)A(θ)F(x)=\frac{A(\phi)}{A(\theta)}

Quantile function

F1(p)=11λ1λW1{λ+1exp(λ+1)[1θA1{pA(θ)}1]}F^{-1}(p)=-1-\frac{1}{\lambda}-\frac{1}{\lambda}W_{-1}\left\{\frac{\lambda+1}{exp(\lambda+1)}\left[\frac{1}{\theta}A^{-1}\{pA(\theta)\}-1\right]\right\}

Hazard rate function

h(x)=θλ21+λ(1+x)exp(λx)A(ϕ)A(θ)A(ϕ)h(x)=\frac{\theta\lambda^2}{1+\lambda}(1+x)exp(-\lambda x)\frac{A^{'}(\phi)}{A(\theta)-A(\phi)}

where W1W_{-1} denotes the negative branch of the Lambert W function. A(θ)=n=1anθnA(\theta)=\sum_{n=1}^{\infty}a_n\theta^{n} is given by specific power series distribution. Note that x>0,λ>0x>0, \lambda>0 for all members in Lindley Power Series distribution. 0<θ<10<\theta<1 for Lindley-Geometric distribution, Lindley-logarithmic distribution, Lindley-Negative Binomial distribution. θ>0\theta>0 for Lindley-Poisson distribution, Lindley-Binomial distribution.

Value

plindleybinomial gives the culmulative distribution function

dlindleybinomial gives the probability density function

hlindleybinomial gives the hazard rate function

qlindleybinomial gives the quantile function

rlindleybinomial gives the random number generatedy by distribution

Invalid arguments will return an error message.

Author(s)

Saralees Nadarajah & Yuancheng Si [email protected]

Peihao Wang

References

Si, Y. & Nadarajah, S., (2018). Lindley Power Series Distributions. Sankhya A, 9, pp1-15.

Ghitany, M. E., Atieh, B., Nadarajah, S., (2008). Lindley distribution and its application. Mathematics and Computers in Simulation, 78, (4), 49-506.

Jodra, P., (2010). Computer generation of random variables with Lindley or Poisson-Lindley distribution via the Lambert W function. Mathematics and Computers in Simulation, 81, (4), 851-859.

Lindley, D. V., (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society. Series B. Methodological, 20, 102-107.

Lindley, D. V., (1965). Introduction to Probability and Statistics from a Bayesian View-point, Part II: Inference. Cambridge University Press, New York.

Examples

set.seed(1)
lambda = 1
theta = 0.5
n = 10
m = 10
x <- seq(from = 0.1,to = 6,by = 0.5)
p <- seq(from = 0.1,to = 1,by = 0.1)
plindleybinomial(x, lambda, theta, m, log.p = FALSE)
dlindleybinomial(x, lambda, theta, m)
hlindleybinomial(x, lambda, theta, m)
qlindleybinomial(p, lambda, theta, m)
rlindleybinomial(n, lambda, theta, m)

LindleyGeometric

Description

distribution function, density function, hazard rate function, quantile function, random number generation

Usage

plindleygeometric(x, lambda, theta, log.p = FALSE)

dlindleygeometric(x, lambda, theta)

hlindleygeometric(x, lambda, theta)

qlindleygeometric(p, lambda, theta)

rlindleygeometric(n, lambda, theta)

Arguments

x

vector of positive quantiles.

lambda

positive parameter

theta

positive parameter.

log.p

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

p

vector of probabilities.

n

number of observations.

Details

Probability density function

f(x)=θλ2(λ+1)A(θ)(1+x)exp(λx)A(ϕ)f(x)=\frac{\theta\lambda^2}{(\lambda+1)A(\theta)}(1+x)exp(-\lambda x)A^{'}(\phi)

Cumulative distribution function

F(x)=A(ϕ)A(θ)F(x)=\frac{A(\phi)}{A(\theta)}

Quantile function

F1(p)=11λ1λW1{λ+1exp(λ+1)[1θA1{pA(θ)}1]}F^{-1}(p)=-1-\frac{1}{\lambda}-\frac{1}{\lambda}W_{-1}\left\{\frac{\lambda+1}{exp(\lambda+1)}\left[\frac{1}{\theta}A^{-1}\{pA(\theta)\}-1\right]\right\}

Hazard rate function

h(x)=θλ21+λ(1+x)exp(λx)A(ϕ)A(θ)A(ϕ)h(x)=\frac{\theta\lambda^2}{1+\lambda}(1+x)exp(-\lambda x)\frac{A^{'}(\phi)}{A(\theta)-A(\phi)}

where W1W_{-1} denotes the negative branch of the Lambert W function. A(θ)=n=1anθnA(\theta)=\sum_{n=1}^{\infty}a_n\theta^{n} is given by specific power series distribution. Note that x>0,λ>0x>0, \lambda>0 for all members in Lindley Power Series distribution. 0<θ<10<\theta<1 for Lindley-Geometric distribution, Lindley-logarithmic distribution, Lindley-Negative Binomial distribution. θ>0\theta>0 for Lindley-Poisson distribution, Lindley-Binomial distribution.

Value

plindleygeometric gives the culmulative distribution function

dlindleygeometric gives the probability density function

hlindleygeometric gives the hazard rate function

qlindleygeometric gives the quantile function

rlindleygeometric gives the random number generatedy by distribution

Invalid arguments will return an error message.

Author(s)

Saralees Nadarajah & Yuancheng Si [email protected]

Peihao Wang

References

Si, Y. & Nadarajah, S., (2018). Lindley Power Series Distributions. Sankhya A, 9, pp1-15.

Ghitany, M. E., Atieh, B., Nadarajah, S., (2008). Lindley distribution and its application. Mathematics and Computers in Simulation, 78, (4), 49-506.

Jodra, P., (2010). Computer generation of random variables with Lindley or Poisson-Lindley distribution via the Lambert W function. Mathematics and Computers in Simulation, 81, (4), 851-859.

Lindley, D. V., (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society. Series B. Methodological, 20, 102-107.

Lindley, D. V., (1965). Introduction to Probability and Statistics from a Bayesian View-point, Part II: Inference. Cambridge University Press, New York.

Examples

set.seed(1)
lambda = 1
theta = 0.5
n = 10
x <- seq(from = 0.1,to = 6,by = 0.5)
p <- seq(from = 0.1,to = 1,by = 0.1)
plindleygeometric(x, lambda, theta, log.p = FALSE)
dlindleygeometric(x, lambda, theta)
hlindleygeometric(x, lambda, theta)
qlindleygeometric(p, lambda, theta)
rlindleygeometric(n, lambda, theta)

LindleyLogarithmic

Description

distribution function, density function, hazard rate function, quantile function, random number generation

Usage

plindleylogarithmic(x, lambda, theta, log.p = FALSE)

dlindleylogarithmic(x, lambda, theta)

hlindleylogarithmic(x, lambda, theta)

qlindleylogarithmic(p, lambda, theta)

rlindleylogarithmic(n, lambda, theta)

Arguments

x

vector of positive quantiles.

lambda

positive parameter

theta

positive parameter.

log.p

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

p

vector of probabilities.

n

number of observations.

Details

Probability density function

f(x)=θλ2(λ+1)A(θ)(1+x)exp(λx)A(ϕ)f(x)=\frac{\theta\lambda^2}{(\lambda+1)A(\theta)}(1+x)exp(-\lambda x)A^{'}(\phi)

Cumulative distribution function

F(x)=A(ϕ)A(θ)F(x)=\frac{A(\phi)}{A(\theta)}

Quantile function

F1(p)=11λ1λW1{λ+1exp(λ+1)[1θA1{pA(θ)}1]}F^{-1}(p)=-1-\frac{1}{\lambda}-\frac{1}{\lambda}W_{-1}\left\{\frac{\lambda+1}{exp(\lambda+1)}\left[\frac{1}{\theta}A^{-1}\{pA(\theta)\}-1\right]\right\}

Hazard rate function

h(x)=θλ21+λ(1+x)exp(λx)A(ϕ)A(θ)A(ϕ)h(x)=\frac{\theta\lambda^2}{1+\lambda}(1+x)exp(-\lambda x)\frac{A^{'}(\phi)}{A(\theta)-A(\phi)}

where W1W_{-1} denotes the negative branch of the Lambert W function. A(θ)=n=1anθnA(\theta)=\sum_{n=1}^{\infty}a_n\theta^{n} is given by specific power series distribution. Note that x>0,λ>0x>0,\lambda>0 for all members in Lindley Power Series distribution. 0<θ<10<\theta<1 for Lindley-Geometric distribution,Lindley-logarithmic distribution,Lindley-Negative Binomial distribution. θ>0\theta>0 for Lindley-Poisson distribution,Lindley-Binomial distribution.

Value

plindleylogarithmic gives the culmulative distribution function

dlindleylogarithmic gives the probability density function

hlindleylogarithmic gives the hazard rate function

qlindleylogarithmic gives the quantile function

rlindleylogarithmic gives the random number generatedy by distribution

Invalid arguments will return an error message.

Author(s)

Saralees Nadarajah & Yuancheng Si [email protected]

Peihao Wang

References

Si, Y. & Nadarajah, S., (2018). Lindley Power Series Distributions. Sankhya A, 9, pp1-15.

Ghitany, M. E., Atieh, B., Nadarajah, S., (2008). Lindley distribution and its application. Mathematics and Computers in Simulation, 78, (4), 49-506.

Jodra, P., (2010). Computer generation of random variables with Lindley or Poisson-Lindley distribution via the Lambert W function. Mathematics and Computers in Simulation, 81, (4), 851-859.

Lindley, D. V., (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society. Series B. Methodological, 20, 102-107.

Lindley, D. V., (1965). Introduction to Probability and Statistics from a Bayesian View-point, Part II: Inference. Cambridge University Press, New York.

Examples

set.seed(1)
lambda = 1
theta = 0.5
n = 10
x <- seq(from = 0.1,to = 6,by = 0.5)
p <- seq(from = 0.1,to = 1,by = 0.1)
plindleylogarithmic(x, lambda, theta, log.p = FALSE)
dlindleylogarithmic(x, lambda, theta)
hlindleylogarithmic(x, lambda, theta)
qlindleylogarithmic(p, lambda, theta)
rlindleylogarithmic(n, lambda, theta)

LindleyNegativeBinomial

Description

distribution function, density function, hazard rate function, quantile function, random number generation

Usage

plindleynb(x, lambda, theta, m, log.p = FALSE)

dlindleynb(x, lambda, theta, m)

qlindleynb(p, lambda, theta, m)

rlindleynb(n, lambda, theta, m)

Arguments

x

vector of positive quantiles.

lambda

positive parameter

theta

positive parameter.

m

target for number of successful trials. Must be strictly positive, need not be integer.

log.p

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

p

vector of probabilities.

n

number of observations.

Details

Probability density function

f(x)=θλ2(λ+1)A(θ)(1+x)exp(λx)A(ϕ)f(x)=\frac{\theta\lambda^2}{(\lambda+1)A(\theta)}(1+x)exp(-\lambda x)A^{'}(\phi)

Cumulative distribution function

F(x)=A(ϕ)A(θ)F(x)=\frac{A(\phi)}{A(\theta)}

Quantile function

F1(p)=11λ1λW1{λ+1exp(λ+1)[1θA1{pA(θ)}1]}F^{-1}(p)=-1-\frac{1}{\lambda}-\frac{1}{\lambda}W_{-1}\left\{\frac{\lambda+1}{exp(\lambda+1)}\left[\frac{1}{\theta}A^{-1}\{pA(\theta)\}-1\right]\right\}

Hazard rate function

h(x)=θλ21+λ(1+x)exp(λx)A(ϕ)A(θ)A(ϕ)h(x)=\frac{\theta\lambda^2}{1+\lambda}(1+x)exp(-\lambda x)\frac{A^{'}(\phi)}{A(\theta)-A(\phi)}

where W1W_{-1} denotes the negative branch of the Lambert W function. A(θ)=n=1anθnA(\theta)=\sum_{n=1}^{\infty}a_n\theta^{n} is given by specific power series distribution. Note that x>0,λ>0x>0,\lambda>0 for all members in Lindley Power Series distribution. 0<θ<10<\theta<1 for Lindley-Geometric distribution,Lindley-logarithmic distribution,Lindley-Negative Binomial distribution. θ>0\theta>0 for Lindley-Poisson distribution,Lindley-Binomial distribution.

Value

plindleynb gives the culmulative distribution function

dlindleynb gives the probability density function

hlindleynb gives the hazard rate function

qlindleynb gives the quantile function

rlindleynb gives the random number generatedy by distribution

Invalid arguments will return an error message.

Author(s)

Saralees Nadarajah & Yuancheng Si [email protected]

Peihao Wang

References

Si, Y. & Nadarajah, S., (2018). Lindley Power Series Distributions. Sankhya A, 9, pp1-15.

Ghitany, M. E., Atieh, B., Nadarajah, S., (2008). Lindley distribution and its application. Mathematics and Computers in Simulation, 78, (4), 49-506.

Jodra, P., (2010). Computer generation of random variables with Lindley or Poisson-Lindley distribution via the Lambert W function. Mathematics and Computers in Simulation, 81, (4), 851-859.

Lindley, D. V., (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society. Series B. Methodological, 20, 102-107.

Lindley, D. V., (1965). Introduction to Probability and Statistics from a Bayesian View-point, Part II: Inference. Cambridge University Press, New York.

Examples

set.seed(1)
lambda = 1
theta = 0.5
n = 10
m = 10
x <- seq(from = 0.1,to = 6,by = 0.5)
p <- seq(from = 0.1,to = 1,by = 0.1)
plindleynb(x, lambda, theta, m, log.p = FALSE)
dlindleynb(x, lambda, theta, m)
hlindleynb(x, lambda, theta, m)
qlindleynb(p, lambda, theta, m)
rlindleynb(n, lambda, theta, m)

LindleyPoisson

Description

distribution function, density function, hazard rate function, quantile function, random number generation

Usage

plindleypoisson(x, lambda, theta, log.p = FALSE)

dlindleypoisson(x, lambda, theta)

hlindleypoisson(x, lambda, theta)

qlindleypoisson(p, lambda, theta)

rlindleypoisson(n, lambda, theta)

Arguments

x

vector of positive quantiles.

lambda

positive parameter

theta

positive parameter.

log.p

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

p

vector of probabilities.

n

number of observations.

Details

Probability density function

f(x)=θλ2(λ+1)A(θ)(1+x)exp(λx)A(ϕ)f(x)=\frac{\theta\lambda^2}{(\lambda+1)A(\theta)}(1+x)exp(-\lambda x)A^{'}(\phi)

Cumulative distribution function

F(x)=A(ϕ)A(θ)F(x)=\frac{A(\phi)}{A(\theta)}

Quantile function

F1(p)=11λ1λW1{λ+1exp(λ+1)[1θA1{pA(θ)}1]}F^{-1}(p)=-1-\frac{1}{\lambda}-\frac{1}{\lambda}W_{-1}\left\{\frac{\lambda+1}{exp(\lambda+1)}\left[\frac{1}{\theta}A^{-1}\{pA(\theta)\}-1\right]\right\}

Hazard rate function

h(x)=θλ21+λ(1+x)exp(λx)A(ϕ)A(θ)A(ϕ)h(x)=\frac{\theta\lambda^2}{1+\lambda}(1+x)exp(-\lambda x)\frac{A^{'}(\phi)}{A(\theta)-A(\phi)}

where W1W_{-1} denotes the negative branch of the Lambert W function. A(θ)=n=1anθnA(\theta)=\sum_{n=1}^{\infty}a_n\theta^{n} is given by specific power series distribution. Note that x>0,λ>0x>0, \lambda>0 for all members in Lindley Power Series distribution. 0<θ<10<\theta<1 for Lindley-Geometric distribution, Lindley-logarithmic distribution, Lindley-Negative Binomial distribution. θ>0\theta>0 for Lindley-Poisson distribution, Lindley-Binomial distribution.

Value

plindleypoisson gives the culmulative distribution function

dlindleypoisson gives the probability density function

hlindleypoisson gives the hazard rate function

qlindleypoisson gives the quantile function

rlindleypoisson gives the random number generatedy by distribution

Invalid arguments will return an error message.

Author(s)

Saralees Nadarajah & Yuancheng Si [email protected]

Peihao Wang

References

Si, Y. & Nadarajah, S., (2018). Lindley Power Series Distributions. Sankhya A, 9, pp1-15.

Ghitany, M. E., Atieh, B., Nadarajah, S., (2008). Lindley distribution and its application. Mathematics and Computers in Simulation, 78, (4), 49-506.

Jodra, P., (2010). Computer generation of random variables with Lindley or Poisson-Lindley distribution via the Lambert W function. Mathematics and Computers in Simulation, 81, (4), 851-859.

Lindley, D. V., (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society. Series B. Methodological, 20, 102-107.

Lindley, D. V., (1965). Introduction to Probability and Statistics from a Bayesian View-point, Part II: Inference. Cambridge University Press, New York.

Examples

set.seed(1)
lambda = 1
theta = 0.5
n = 10
x <- seq(from = 0.1,to = 6,by = 0.5)
p <- seq(from = 0.1,to = 1,by = 0.1)
plindleypoisson(x, lambda, theta, log.p = FALSE)
dlindleypoisson(x, lambda, theta)
hlindleypoisson(x, lambda, theta)
qlindleypoisson(p, lambda, theta)
rlindleypoisson(n, lambda, theta)