Log odds, also known as logits, are the logarithms, usually to the base of the natural logarithms, of odds.

logit(p)

Arguments

p

A numeric vector of probabilities, which are values between 0.0 and 1.0.

Value

A numeric vector of logits, which are positive or negative real numbers.

Examples

p <- c(0.1, 0.25, 0.5, 0.9)
logit(p)
#> [1] -2.197225 -1.098612  0.000000  2.197225