logit {gtools} | R Documentation |
Generalized logit and inverse logit function
Description
Compute generalized logit and generalized inverse logit functions.
Usage
logit(x, min = 0, max = 1)
inv.logit(x, min = 0, max = 1)
Arguments
x |
value(s) to be transformed |
min |
Lower end of logit interval |
max |
Upper end of logit interval |
Details
The generalized logit function takes values on [min, max] and transforms them to span [-Inf,Inf] it is defined as:
where
The generalized inverse logit function provides the inverse transformation:
where
Value
Transformed value(s).
Author(s)
Gregory R. Warnes greg@warnes.net
See Also
Examples
x <- seq(0, 10, by = 0.25)
xt <- logit(x, min = 0, max = 10)
cbind(x, xt)
y <- inv.logit(xt, min = 0, max = 10)
cbind(x, xt, y)
[Package gtools version 3.9.5 Index]