expit computes \(exp(x) / (1 + exp(x))\), i.e. the inverse to logit, i.e. it maps the interval \((-\infty, \infty)\) to the interval of \([0, 1]\).

expit(x)

Arguments

x

a number

Value

expit of x

See also

'logit'

Examples

expit(-1e10)
#> [1] 0
expit(0)
#> [1] 0.5
expit(1e10)
#> [1] NaN