Skip to contents

logit applies the logit transformation to convert a vector of values between 0 and 1, to values between -Inf and Inf. Used to convert a probability from a logistic regression model onto the linear predictor scale.

Usage

logit(p)

Arguments

p

Numeric vector of probabilities (i.e. values between 0 and 1) that will be transformed.

Value

A numeric vector, with values between -Inf and Inf

See also

Examples

logit(0.5)
#> [1] 0
logit(c(0.1, 0.2, 0.3))
#> [1] -2.1972246 -1.3862944 -0.8472979