| llogis | R Documentation |
Density, distribution function, quantile function, and random generation for the log-logistic distribution.
dllogis(x, alpha = 1, beta = 1, log = FALSE)
pllogis(q, alpha = 1, beta = 1, lower.tail = TRUE, log.p = FALSE)
qllogis(p, alpha = 1, beta = 1, lower.tail = TRUE, log.p = FALSE)
rllogis(n, alpha = 1, beta = 1)
x, q |
vector of quantiles ( |
alpha |
scale parameter ( |
beta |
shape parameter ( |
log |
logical; if |
lower.tail |
logical; if |
log.p |
logical; if |
p |
vector of probabilities. |
n |
number of random values to return. |
The log-logistic distribution has density
f(x;\,\alpha,\beta) = \frac{(\beta/\alpha)\,(x/\alpha)^{\beta-1}}{\bigl(1 + (x/\alpha)^\beta\bigr)^2}, \quad x > 0,
where \alpha > 0 is the scale parameter and \beta > 0 is the shape parameter.
The scale parameter equals the median. Larger \beta gives lighter tails; the distribution
has a finite mean only when \beta > 1 and a finite variance only when \beta > 2.
The log-logistic arises naturally as the distribution of X = e^Y where
Y \sim \mathrm{Logistic}(\log\alpha,\, 1/\beta), which yields the
numerically convenient log-density
\log f(x) = \log\beta - \log x + \log f_{\mathrm{logistic}}\!\bigl(\beta\log(x/\alpha)\bigr).
The CDF is
F(x;\,\alpha,\beta) = \frac{1}{1 + (x/\alpha)^{-\beta}},
and the quantile function is
Q(p;\,\alpha,\beta) = \alpha \left(\frac{p}{1-p}\right)^{1/\beta}.
dllogis allows for automatic differentiation with RTMB.
dllogis gives the density, pllogis gives the distribution function,
qllogis gives the quantile function, and rllogis generates random deviates.
x <- rllogis(5, alpha = 1, beta = 2)
dllogis(x, alpha = 1, beta = 2)
pllogis(c(0.5, 1, 2), alpha = 1, beta = 2)
qllogis(c(0.25, 0.5, 0.75), alpha = 1, beta = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.