Log-logistic distribution
In probability and statistics, the log-logistic distribution (known as the Fisk distribution in economics) is a continuous probability distribution for a non-negative random variable. It is used in survival analysis as a parametric model for events whose rate increases initially and decreases later, for example mortality from cancer following diagnosis or treatment. It has also been used in hydrology to model stream flow and precipitation, and in economics as a simple model of the distribution of wealth or income.
The log-logistic distribution is the probability distribution of a random variable whose logarithm has a logistic distribution. 
It is similar in shape to the log-normal distribution but has heavier tails. Its cumulative distribution function can be written in closed form, unlike that of the log-normal.

# Characterisation
There are several different parameterizations of the distribution in use. The one shown here gives reasonably interpretable parameters and a simple form for the cumulative distribution function.
The parameter \alpha>0 is a scale parameter and is also the median of the distribution. The parameter \beta>0 is a shape parameter. The distribution is unimodal when \beta>1 and its dispersion decreases as \beta increases.
The cumulative distribution function is
F(x; \alpha, \beta) & = {       1         \over 1+(x/\alpha)^{-\beta} } \\
\end{align}
where x>0, \alpha>0, \beta>0.
The probability density function is

# Properties

## Moments
The kth raw moment exists only when k when it is given by
\operatorname{E}(X^k) 
&  = \alpha^k\,\operatorname{B}(1-k/\beta,\, 1+k/\beta) \\
& = \alpha^k\, {k\,\pi/\beta \over \sin(k\,\pi/\beta)}
\end{align} 
where B() is the beta function.
Expressions for the mean, variance, skewness and kurtosis can be derived from this. Writing b=\pi/\beta for convenience, the mean is
and the variance is
Explicit expressions for the kurtosis and variance are lengthy.
As \beta tends to infinity the mean tends to \alpha, the variance and skewness tend to zero and the excess kurtosis tends to 6/5 (see also related distributions below).

## Quantiles
The quantile function (inverse cumulative distribution function) is :
It follows that the median is \alpha, 
the lower quartile is 3^{1/\beta} \alpha  
and the upper quartile is 3^{-1/\beta} \alpha.

# Applications

## Survival analysis
The log-logistic distribution provides one parametric model for survival analysis. Unlike the more commonly-used Weibull distribution, it can have a non-monotonic hazard function: when \beta>1, the hazard function is unimodal (when \beta  1, the hazard decreases monotonically). The fact that the cumulative distribution function can be written in closed form is particularly useful for analysis of survival data with censoring. 
The log-logistic distribution can be used as the basis of an accelerated failure time model by allowing \beta to differ between groups, or more generally by introducing covariates that affect \beta but not \alpha by modelling \log(\beta) as a linear function of the covariates.
The survival function is
and so the hazard function is

## Hydrology
The log-logistic distribution has been used in hydrology for modelling stream flow rates and precipitation.

## Economics
The log-logistic has been used as a simple model of the distribution of wealth or income in economics, where it is known as the Fisk distribution.
Its Gini coefficient is 1/\beta.

# Related distributions
- If X has a log-logistic distribution with scale parameter \alpha and shape parameter \beta then Y = log(X) has a logistic distribution with location parameter \log(\alpha) and scale parameter \beta.
- As the shape parameter \beta of the log-logistic distribution increases, its shape increasingly resembles that of a (very narrow) logistic distribution. Informally, as \beta,
- The log-logistic distribution with shape parameter \beta=1 and scale parameter \alpha is the same as the generalized Pareto distribution with location parameter \mu=0, shape parameter \xi=1 and scale parameter \alpha:

## Generalizations
Several different distributions are sometimes referred to as the generalized log-logistic distribution, as they contain the log-logistic as a special case. These include the Burr Type XII distribution (also known as the Singh-Maddala distribution) and the Dagum distribution, both of which include a second shape parameter. Both are in turn special cases of the even more general generalized beta distribution of the second kind. Another more straightforward generalization of the log-logistic is given in the next section.

# Shifted log-logistic distribution
where z=(x-\mu)/\sigma\,|
where z=(x-\mu)/\sigma\,|
where \alpha= \pi \xi\, |
where \alpha= \pi \xi\, |
The shifted log-logistic distribution is also known as the generalized log-logistic, the generalized logistic,
-r the three-parameter log-logistic distribution.
It can be obtained from the log-logistic distribution by addition of a shift parameter \delta: if X has a log-logistic distribution then X+\delta has a shifted log-logistic distribution. So  Y has a shifted log-logistic distribution if \log(Y-\delta) has a logistic distribution. The shift parameter adds a location parameter to the  scale and shape parameters of the (unshifted) log-logistic.
The properties of this distribution are straightforward to derive from those of the log-logistic distribution. However, an alternative parameterisation, similar to that used for the generalized Pareto distribution and the generalized extreme value distribution, gives more interpretable parameters and also aids their estimation.
In this parameterisation, the cumulative distribution function of the shifted log-logistic distribution is
for  1 + \xi(x-\mu)/\sigma \geqslant 0, where \mu\in\mathbb R is the location parameter, \sigma>0\, the scale parameter and \xi\in\mathbb R the shape parameter.  Note that some references use  \kappa =  - \xi\,\! to parameterise the shape.
The probability density function is
{\sigma\left^2} . 
again, for  1 + \xi(x-\mu)/\sigma \geqslant 0. 
The shape parameter \xi is often restricted to lie in , when the probability density function is bounded. When |\xi|>1, it has an asymptote at x = \mu - \sigma/\xi. Reversing the sign of \xi reflects the pdf and the cdf about x=0..

## Related distributions
- When \mu = \sigma/\xi, the shifted log-logistic reduces to the log-logistic distribution.
- When \xi  0, the shifted log-logistic reduces to the logistic distribution.
- The shifted log-logistic with shape parameter \xi=1 is the same as the generalized Pareto distribution with shape parameter \xi=1.

## Applications
The three-parameter log-logistic distribution is used in hydrology for modelling  flood frequency.