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 [-Inf, Inf].
It is defined as:
$$y = log\left (\frac{p}{1-p} \right ) \;\;\; \; \textup{where} \; \;\; p=\frac{x-min}{max-min}$$
The generalized inverse logit function provides the inverse
transformation:
$$x = p' \cdot (max-min) + min \;\;\; \; \textup{where} \; \;\; p'=\frac{exp(y)}{1+exp(y)}$$