inv_logit: Apply the inverse logit function to an input

View source: R/utils.R

inv_logitR Documentation

Apply the inverse logit function to an input

Description

inv_logit applies the inverse-logit transformation (expit/ logistic function) to convert a vector of values between -Inf and Inf, to values between 0 and 1. Used to convert the linear predictor of a logistic regression model into a probability.

Usage

inv_logit(x)

Arguments

x

Numeric vector with values between -Inf and Inf.

Value

Numeric vector of probabilities (i.e. values between 0 and 1)

See Also

logit

Examples

inv_logit(-2)
inv_logit(c(-2,-1,0,1,2))

GlenMartin31/pmupdate documentation built on Sept. 2, 2024, 3:32 a.m.