The expit and logit functions are useful shortcuts when using logistic regression models.
Usage
expit(x)
logit(p)
Arguments
x
a real number
p
a number between 0 and 1, i.e. a probability
Value
A numeric value, possibly vectorized, depending on the input.
Details
The logit function is defined as logit(p) = log(p)/log(1-p) and can also be
described as the log odds of a given probability. The expit is the inverse
of the logit function and is defined as expit(x) = exp(x)/(1+exp(x)).