Learn R Programming

reliaR (version 0.01)

LogisRayleigh: The Logistic-Rayleigh(LR) distribution

Description

Density, distribution function, quantile function and random generation for the Logistic-Rayleigh(LR) distribution with shape parameter alpha and scale parameter lambda.

Usage

dlogis.rayleigh(x, alpha, lambda, log = FALSE) plogis.rayleigh(q, alpha, lambda, lower.tail = TRUE, log.p = FALSE) qlogis.rayleigh(p, alpha, lambda, lower.tail = TRUE, log.p = FALSE) rlogis.rayleigh(n, alpha, lambda)

Arguments

x,q
vector of quantiles.
p
vector of probabilities.
n
number of observations. If length(n) > 1, the length is taken to be the number required.
alpha
shape parameter.
lambda
scale parameter.
log, log.p
logical; if TRUE, probabilities p are given as log(p).
lower.tail
logical; if TRUE (default), probabilities are $P[X \le x]$ otherwise, $P[X > x]$.

Value

dlogis.rayleigh gives the density, plogis.rayleigh gives the distribution function, qlogis.rayleigh gives the quantile function, and rlogis.rayleigh generates random deviates.

Details

The cummulative distribution function(cdf) of Logistic-Rayleigh(LR) is given by $$F(x) = 1 - \frac{1}{1+\left(e^{(\lambda x^2 / 2)} - 1\right)^{\alpha}};\, x \ge 0, \alpha > 0, \lambda > 0.$$

where $\alpha$ and $\lambda$ are the shape and scale parameters, respectively.

References

Lan, Y. and Leemis, L. M. (2008). The Logistic-Exponential Survival Distribution, Naval Research Logistics, 55, 252-264.

See Also

.Random.seed about random number; slogis.rayleigh for ExpExt survival / hazard etc. functions

Examples

Run this code
## Load data sets
data(stress)
## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(stress)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 1.4779388, lambda.est = 0.2141343
dlogis.rayleigh(stress, 1.4779388, 0.2141343, log = FALSE)
plogis.rayleigh(stress, 1.4779388, 0.2141343, lower.tail = TRUE, log.p = FALSE)
qlogis.rayleigh(0.25, 1.4779388, 0.2141343, lower.tail=TRUE, log.p = FALSE)
rlogis.rayleigh(30, 1.4779388, 0.2141343)

Run the code above in your browser using DataLab