Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


DescTools (version 0.99.41)

Logit: Generalized Logit and Inverse Logit Function

Description

Compute generalized logit and generalized inverse logit functions.

Usage

Logit(x, min = 0, max = 1)
LogitInv(x, min = 0, max = 1)

Arguments

x

value(s) to be transformed

min

lower end of logit interval

max

upper end of logit interval

Value

Transformed value(s).

Details

The generalized logit function takes values on [min, max] and transforms them to span [,]. It is defined as:

y=log(p1p)wherep=xminmaxmin

The generalized inverse logit function provides the inverse transformation:

x=p(maxmin)+minwherep=exp(y)1+exp(y)

See Also

logit

Examples

Run this code
# NOT RUN {
x <- seq(0,10, by=0.25)
xt <- Logit(x, min=0, max=10)
cbind(x,xt)

y <- LogitInv(xt, min=0, max=10)
cbind(x, xt, y)

# }

Run the code above in your browser using DataLab