logit: Logit and inverse logit transforms

Description Usage Arguments Value Author(s) See Also Examples

View source: R/logit.R

Description

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

Usage

1
2
3

Arguments

a

A vector of real values.

p

A vector of probabilities.

Value

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.

Author(s)

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

See Also

Used in tt and inv.tt.

Examples

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

GMCM documentation built on Nov. 6, 2019, 1:08 a.m.