logit: Perform the Logit Tranformation

Description Usage Arguments Details Value See Also Examples

View source: R/logit.R

Description

Performs the logit transformation. See the details below for exactly what this means.

Usage

1
logit(x)

Arguments

x

A numeric vector, possibly length > 1, containing the number in the interval from [0,1] to convert to logit space.

Details

The logit tranformation turns a number in the interval [0,1] (e.g., the probability scale) to logit-space, which ranges from negative to positive infinity. It is also known as the log-odds transformation, and is a commonly used link function in GLMs using binary data. I can never remember which transformation the built-in qlogis or plogis functions do, so I wrote my own that are more in their names.

Value

A numeric vector with the same length as x containing the logit of x.

See Also

expit

Examples

1
2
3
logit(x = 0.5)
logit(x = 0.2)
logit(x = c(0.2, 0.5, 0.7))

bstaton1/StatonMisc documentation built on May 18, 2020, 12:06 a.m.