logit function

Logit and inverse logit transforms

Logit and inverse logit transforms

The logit transformation (i.e. the log of the odds) and its inverse (also called expit).

inv.logit(a) logit(p)

Arguments

  • a: A vector of real values.
  • p: A vector of probabilities.

Returns

inv.logit returns a vector of the same length as a of the inverse logit transformed values. This function is also known as the expit-function.

logit returns a vector of the same length as p with the log odds of p.

Examples

p <- runif(100) print(a <- GMCM:::logit(p)) p - GMCM:::inv.logit(a)

See Also

Used in tt and inv.tt.

Author(s)

Anders Ellern Bilgrau anders.ellern.bilgrau@gmail.com

  • Maintainer: Anders Ellern Bilgrau
  • License: GPL (>= 2)
  • Last published: 2019-11-05