flexsurv (version 1.1.1)

Llogis: The log-logistic distribution


Density, distribution function, hazards, quantile function and random generation for the log-logistic distribution.


x, q

vector of quantiles.


vector of probabilities.


number of observations. If length(n) > 1, the length is taken to be the number required.

shape, scale

vector of shape and scale parameters.

log, log.p

logical; if TRUE, probabilities p are given as log(p).


logical; if TRUE (default), probabilities are \(P(X \le x)\), otherwise, \(P(X > x)\).


dllogis gives the density, pllogis gives the distribution function, qllogis gives the quantile function, hllogis gives the hazard function, Hllogis gives the cumulative hazard function, and rllogis generates random deviates.


The log-logistic distribution with shape parameter \(a>0\) and scale parameter \(b>0\) has probability density function

$$f(x | a, b) = (a/b) (x/b)^{a-1} / (1 + (x/b)^a)^2$$

and hazard

$$h(x | a, b) = (a/b) (x/b)^{a-1} / (1 + (x/b)^a)$$

for \(x>0\). The hazard is decreasing for shape \(a\leq 1\), and unimodal for \(a > 1\).

The probability distribution function is $$F(x | a, b) = 1 - 1 / (1 + (x/b)^a)$$

If \(a > 1\), the mean is \(b c / sin(c)\), and if \(a > 2\) the variance is \(b^2 * (2*c/sin(2*c) - c^2/sin(c)^2)\), where \(c = \pi/a\), otherwise these are undefined.


Stata Press (2007) Stata release 10 manual: Survival analysis and epidemiological tables.

See Also