View source: R/numericFunctions.R
logit | R Documentation |
Compute an extended logit transformation of a real vector
logit(x, repl.inf = FALSE, bound = 1e+12)
x |
A real-valued vector with elements in [0,1]. |
repl.inf |
(Logical) Replace -Inf and Inf values with finite approximations (Default: FALSE). |
bound |
Absolute value of the finite approximation to -Inf and Inf (Default: 1e-12). |
In contrast to the conventional logit function which has support on (0,1),
this version has support on [0,1], where /codelogit(0) = -Inf
and
/codelogit(1) = Inf
. For sloppy computational convenience when, for
example, averaging logits, the infinte values can be replaced with finite
approximations.
A numeric vector containing logit(x). See Details.
Steve Gutreuter
logit
from the boot
package for a
conventional C++ alternative.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.