View source: R/dist_logistic.R
| dist_logistic | R Documentation |
A continuous distribution on the real line. For binary outcomes
the model given by P(Y = 1 | X) = F(X \beta) where
F is the Logistic cdf() is called logistic regression.
dist_logistic(location, scale)
location, scale |
location and scale parameters. |
We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_logistic.html
In the following, let X be a Logistic random variable with
location = \mu and scale = s.
Support: R, the set of all real numbers
Mean: \mu
Variance: s^2 \pi^2 / 3
Probability density function (p.d.f):
f(x) = \frac{e^{-\frac{x - \mu}{s}}}{s \left[1 + e^{-\frac{x - \mu}{s}}\right]^2}
Cumulative distribution function (c.d.f):
F(x) = \frac{1}{1 + e^{-\frac{x - \mu}{s}}}
Moment generating function (m.g.f):
E(e^{tX}) = e^{\mu t} B(1 - st, 1 + st)
for -1 < st < 1, where B(a, b) is the Beta function.
stats::Logistic
dist <- dist_logistic(location = c(5,9,9,6,2), scale = c(2,3,4,2,1))
dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.