R/logit.R
logit.Rd
Calculates the logit (or log-odds) value of a probability
logit(p) unlogit(a)
vector of probabilities between 0 and 1 (exclusive)
a numeric vector
probs <- runif(100) a <- logit(probs) plot(probs, a, xlim = c(0, 1)) probs0 <- unlogit(a) plot(probs, probs0, xlim = c(0, 1), ylim = c(0, 1))