Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist_logistic

The Logistic distribution


Description

[Stable]

Usage

dist_logistic(location, scale)

Arguments

location

location and scale parameters.

scale

location and scale parameters.

Details

A continuous distribution on the real line. For binary outcomes the model given by P(Y = 1 | X) = F(X β) where F is the Logistic cdf() is called logistic regression.

We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.

In the following, let X be a Logistic random variable with location = μ and scale = s.

Support: R, the set of all real numbers

Mean: μ

Variance: s^2 π^2 / 3

Probability density function (p.d.f):

f(x) = e^(-(t - μ) / s) / (s (1 + e^(-(t - μ) / s))^2)

Cumulative distribution function (c.d.f):

F(t) = 1 / (1 + e^(-(t - μ) / s))

Moment generating function (m.g.f):

E(e^(tX)) = = e^(μ t) β(1 - st, 1 + st)

where β(x, y) is the Beta function.

See Also

Examples

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)

distributional

Vectorised Probability Distributions

v0.2.2
GPL-3
Authors
Mitchell O'Hara-Wild [aut, cre] (<https://orcid.org/0000-0001-6729-7695>), Earo Wang [ctb] (<https://orcid.org/0000-0001-6448-5260>), Matthew Kay [ctb] (<https://orcid.org/0000-0001-9446-0419>), Alex Hayes [aut] (<https://orcid.org/0000-0002-4985-5160>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.