loglogistic function

Log-logistic distribution

Log-logistic distribution

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

Details

Log-logistic distribution LL(alpha,gamma)LL(alpha,gamma)

has a density

f(x)=αγ(αx)γ1{1+(αx)γ}2,x>0, f(x) =\displaystyle\frac{\alpha\gamma(\alpha\,x)^{\gamma-1}}{\bigl\{1 +(\alpha\,x)^{\gamma}\bigr\}^{2}},\quad x>0,%f(x) = (alpha*gamma*(alpha*x)^(gamma-1)) / (1 + (alpha*x)^gamma)^2, x>0

and a distribution function

F(x)=11(1+(αx)γ),x>0, F(x) =\displaystyle 1 - \frac{1}{(1 + (\alpha\,x)^\gamma)}, x>0,%F(x) = 1 - 1 / (1 + (alpha*x)^gamma), x>0,

where alphaalpha and gammagamma are positive parameters (alphaalpha is the inverse of the scale parameter and gammagamma is the shape parameter). The mean and the variance are given by

\mboxEX  =  1απγsin(πγ),γ>1,\mboxvarX  =  1α2{2πγsin(2πγ)π2γ2sin2(πγ)},γ>2, \begin{array}{rcll}\mbox{E}X & \;=\; & \displaystyle \frac{1}{\alpha}\,\frac{\pi}{\gamma\sin\bigl(\frac{\pi}{\gamma}\bigr)}, &\quad \gamma > 1, \\[4ex]\mbox{var}X & \;=\; & \displaystyle \frac{1}{\alpha^2}\,\biggl\{\frac{2\pi}{\gamma\sin\bigl(\frac{2\pi}{\gamma}\bigr)}\,-\,\frac{\pi^2}{\gamma^2\sin^2\bigl(\frac{\pi}{\gamma}\bigr)}\biggr\},&\quad \gamma > 2, \\[4ex]\end{array}%EX = pi/(alpha*gamma*sin(pi/gamma)), gamma>1,var X = alpha^(-2)*(2*pi/(gamma*sin(2*pi/gamma) - pi^2/(gamma^2*sin^2(pi/gamma)))), gamma>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 gammagamma.
  • scale: the scale parameter alpha(1)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]P[X <= x], otherwise, P[X>x]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)