Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logit

Logistic and odds functions and their inverses.


Description

Logistic and odds functions and their inverses.

Usage

logit(p)
antilogit(x)

odds(p)
antiodds(o)

Arguments

p

Probability value, a vector of numbers between 0 and 1, inclusive.

x

Real number, a vector of numbers between -Inf and Inf.

o

Real number, a vector of numbers between 0 and Inf.

Value

Vector of real values log(p/(1-p)) for logit. Vector of probabilities exp(x)/(1+exp(x)) for antilogit with boundary values of -Inf and Inf for x correctly handled. Vector of real values p/(1-p) for odds. Vector of probabilities o/(o+1) for antiodds with the boundary value of Inf for o correctly handled.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

Examples

logit(seq(0, 1, .1))
antilogit(logit(seq(0, 1, .1)))

odds(seq(0, 1, .1))
antiodds(odds(seq(0, 1, .1)))

HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.