invLogitAdj {statisfactory} | R Documentation |
Inverse logit is robust to cases that equal 0 or 1
Description
This function is the inverse of logitAdj
. That function calculates the logit of values but is robust to cases where the operand is 0 or 1. The adjusted inverse logit is equal to (base^x + epsilon * base^x - epsilon) / (base^x + 1)
.
Usage
invLogitAdj(x, epsilon = 0.01, base = 10, auto = FALSE)
Arguments
x |
Numeric vector.
|
epsilon |
Value or character. If a numeric value (typically ~0.01 or smaller), then this is added/subtracted from x to ensure log of 0 or 1 is not taken. If equal to 'auto' then the value of epsilon is taken from the attributes of x . If x has no such attribute, a warning is given and a value of 0.01 is used.
|
base |
Base of logarithm. Use base=exp(1) for base e .
|
auto |
If TRUE then if the attributes of x have slots named epsilon and base then use these instead of the user-supplied values of epsilon and base . If they do not appear as attributes of x but auto is TRUE then the function prints warnings and uses 0.01 and 10, respectively. If FALSE (default) then use the user-supplied values of epsilon and base .
|
Value
Numeric.
See Also
logitAdj
Examples
x <- seq(0, 1, by=0.1)
y <- logitAdj(x)
xx <- invLogitAdj(y, auto = TRUE)
[Package
statisfactory version 1.0.4
Index]