The probability density function, cumulative density function, inverse cumulative density function, random generation for the log logistic distribution.
Logical; if TRUE (default), probabilities are P(X <= x) otherwise, P(X > x).
log.p
Logical; if TRUE, probabilities p are given as log(p).
p
Vector of probabilities.
n
Number of observations. If length(n) > 1, the length is taken to be the number required.
Value
dllog returns vector of the densities.
pllog returns a vector of probabilities.
qllog returns a vector of quantiles.
rllog returns a vector of random log-logistic variates.
Details
If X is a random variable distributed according to a logistic distribution, then Y = exp(X) has a log-logistic distribution.
The log-logistic distribution with parameters shape = a and scale = s has density
$$f(x) = \frac{(\frac{x}{\exp{s}})^{\frac{1}{a} - 1}}{a\exp{s}(1+(\frac{x}{\exp{s}})^{1/a})^2}$$
for x >= 0, a > 1, and s > 0. The median is log(s), mean is
$$\frac{a\pi\exp{s}}{sin(a*\pi)}$$
for 1/s > 1. The variance is
$$(log(s))^2(\frac{2}{a(sin(2/a))}- \frac{1}{a^2(sin^2(1/a))})$$
for 1/s > 2. The mode is
$$exp(s)(\frac{(1/a) - 1}{(1/a) + 1})^{a}$$
for 1/s > 1 otherwise it is zero.