expit: The expit function

View source: R/utils.R

expitR Documentation

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)

Arguments

x

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

Value

a number or real-valued vector

Examples

expit(0.2)
expit(c(-1, -0.3, 0.6))

ddtlcm documentation built on May 29, 2024, 5:41 a.m.