Log-logistic distribution
Density, distribution function, quantile function and random generation for the log-logistic distribution.
Details
Log-logistic distribution LL(alpha,gamma)
has a density
f(x)={1+(αx)γ}2αγ(αx)γ−1,x>0,
and a distribution function
F(x)=1−(1+(αx)γ)1,x>0,
where alpha and gamma are positive parameters (alpha is the inverse of the scale
parameter and gamma is the shape
parameter). The mean and the variance are given by
\mboxEX\mboxvarX==α1γsin(γπ)π,α21{γsin(γ2π)2π−γ2sin2(γπ)π2},γ>1,γ>2,
dllogis(x, shape, scale=1, log=FALSE)
pllogis(q, shape, scale=1, lower.tail=TRUE, log.p=FALSE)
qllogis(p, shape, scale=1, lower.tail=TRUE, log.p=FALSE)
rllogis(n, shape, scale=1)
Arguments
x, q
: vector of quantiles.
p
: vector of probabilities.
n
: number of observations.
shape
: the shape parameter gamma.
scale
: the scale parameter alpha(−1).
log, log.p
: logical; if TRUE
, probabilities p
are given as log(p)
.
lower.tail
: logical; if TRUE
(default), probabilities are P[X<=x], otherwise, P[X>x].
Returns
dllogis
gives the density, pllogis
gives the distribution function, qllogis
gives the quantile function, and rllogis
generates random deviates.
See Also
Logistic
.
Author(s)
Arnošt Komárek arnost.komarek@mff.cuni.cz
Examples
set.seed(1977)
print(x <- rllogis(10, shape=3, scale=5))
print(d <- dllogis(x, shape=3, scale=5))
print(p <- pllogis(x, shape=3, scale=5))
qllogis(p, shape=3, scale=5)