Learn R Programming

ddtlcm (version 0.2.1)

expit: The expit function

Description

The expit function: f(x) = exp(x) / (1+exp(x)), computed in a way to avoid numerical underflow.

Usage

expit(x)

Value

a number or real-valued vector

Arguments

x

a value or a numeric vector between 0 and 1 (exclusive)

Examples

Run this code
expit(0.2)
expit(c(-1, -0.3, 0.6))

Run the code above in your browser using DataLab