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

expit

Expit, Logit, and odds


Description

Compute the expit and logit of a numerical vector. Transform odds to probability.

Usage

expit(x)
logit(x)
odds(x)

Arguments

x

vector of real values.

Details

logit computes the logit function:

logit(p) = log(p/(1-p)),

expit computes the expit function:

expit(x) = e^x/(1+e^x).

odds transform an odd into a probability.

odds(x) = x/(1-x)

Those functions become numerically unstable if evaluated at the edge or the definition range.

Value

A real vector corresponding to the expit, the logit or the odds of the input values.

Author(s)

Gilles Kratzer


abn

Modelling Multivariate Data with Additive Bayesian Networks

v2.5-0
GPL (>= 2)
Authors
Gilles Kratzer [aut, cre] (<https://orcid.org/0000-0002-5929-8935>), Fraser Iain Lewis [aut] (<https://orcid.org/0000-0003-4580-2712>), Reinhard Furrer [ctb] (<https://orcid.org/0000-0002-6319-2332>), Marta Pittavino [ctb] (<https://orcid.org/0000-0002-1232-1034>)
Initial release
2021-04-21

We don't support your browser anymore

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