logit {lca}R Documentation

Logit scale transformations

Description

Function to transform logit scale values (over [0,1]) to the real line and back.

Usage

logit(z)
expit(x)

Arguments

z a vector of values between 0 and 1 to be mapped.
x a vector of real values.

Details

logit is defined as log(z / (1 - z)) for any value between 0 and 1. logit(0) = -Inf and logit(1) = Inf as this corresponds with limits.

Similarly, expit = e^x / (1 + e^x) is the inverse function for any real value.

Value

Both functions return vector of the same length as the input.

Author(s)

Robin Evans

See Also

logitTrans

Examples

z = c(0.3, 0.2, 1)
x = logit(z)
x

expit(x)

[Package lca version 0.2 Index]