Compute the expit and logit of a numerical vector. Transform odds to probability.
expit(x)
logit(x)
odds(x)A real vector corresponding to the expit, the logit or the odds of the input values.
vector of real values.
Gilles Kratzer
logit computes the logit function:
$$logit(p) = \log\frac{p}{1-p}$$
expit computes the expit function:
$$expit(x) = \frac{e^x}{1+e^x}$$
odds transform an odd into a probability.
$$odds(x) = \frac{x}{1-x}$$
Those functions become numerically unstable if evaluated at the edge or the definition range.