The probability density function, cumulative density function, inverse cumulative density function, random generation for the log logistic distribution.
rllog returns a vector of random log-logistic variates.
Arguments
x
Vector of quantiles.
shape
Shape parameter.
scale
Scale parameter.
log
Logical; if TRUE, log densities are returned.
...
Currently ignored.
q
Vector of quantiles.
lower.tail
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.
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{1}{a*exp(s))})(\frac{x}{\exp{s}})^{\frac{1}{a} - 1}}{(1+(\frac{x}{\exp{s}})^{1/a})^2}$$
for x >= 0, a > 1, and s > 0.
The median is exp(s), mean is
$$\frac{a\pi*exp(s)}{sin(a*\pi)}$$
for 1/a > 1. The variance is
$$(exp(s))^2(\frac{2*\pi*a}{(sin(2*pi*a))}- \frac{(a*\pi)^2}{(sin^2(a*\pi))})$$
for 1/a > 2. The mode is
$$exp(s)(\frac{(1/a) - 1}{(1/a) + 1})^{a}$$
for 1/a > 1 otherwise it is zero.