LogLogistic {windAC} | R Documentation |
Log-Logistic Distribution
Description
The probability density function, cumulative density function, inverse cumulative density function, random generation for the log logistic distribution.
Usage
dllog(x, shape = 1, scale = 1, log = FALSE, ...)
llogSummaryStats(shape, scale)
pllog(q, shape = 1, scale = 1, lower.tail = TRUE, log.p = FALSE, ...)
qllog(p, shape = 1, scale = 1, lower.tail = TRUE, log.p = FALSE, ...)
rllog(n, shape = 1, scale = 1, ...)
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 |
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.
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.
See Also
Examples
y <- rllog(5,shape=1,scale=1/3)
dllog(x=y,shape=1,scale=1/3)
dlogis(x=log(y),location=1/3,scale=1)/y
pllog(q=y,shape=1,scale=1/3)
qllog(p=seq(0,1,by=.25),shape=1,scale=1/3)