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

Logistic

Create a Logistic distribution


Description

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.

Usage

Logistic(location = 0, scale = 1)

Arguments

location

The location parameter for the distribution. For Logistic distributions, the location parameter is the mean, median and also mode. Defaults to zero.

scale

The scale parameter for the distribution. Defaults to one.

Details

We recommend reading this documentation on https://alexpghayes.github.io/distributions3, where the math will render with additional detail and much greater clarity.

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.

Value

A Logistic object.

See Also

Examples

set.seed(27)

X <- Logistic(2, 4)
X

random(X, 10)

pdf(X, 2)
log_pdf(X, 2)

cdf(X, 4)
quantile(X, 0.7)

distributions3

Probability Distributions as S3 Objects

v0.1.1
MIT + file LICENSE
Authors
Alex Hayes [aut, cre] (<https://orcid.org/0000-0002-4985-5160>), Ralph Moller-Trane [aut], Emil Hvitfeldt [ctb] (<https://orcid.org/0000-0002-0679-1945>), Daniel Jordan [ctb], Bruna Wundervald [ctb]
Initial release

We don't support your browser anymore

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