logitAdj: A logit() function robust to values that equal 0 or 1
Description
This function returns the logit value (log(x / (1 - x))) where a small value can be added to x to avoid problems of calculating the log when x equals 0 or 1.
Usage
logitAdj(x, epsilon = 0.01, base = 10)
Value
Numeric equal to log((x + epsilon)/(1 - x + epsilon), base=base).
Arguments
x
Numeric vector.
epsilon
Value to add/subtract from x to ensure log of 0 or 1 is not taken (usually a small number). If NULL, then the smallest value of any x > 0 and 1 - x for all x < 1 is used.