logit and inverse logit (expit) functions
Usage
logit(x, low = 0, high = 1)
expit(alpha, low = 0, high = 1)
logitNormInfo(mean = 0, sd = 1, low = 0, high = 1, abs.tol = 1e-06, ...)
probitNormInfo(mean = 0, sd = 1, low = 0, high = 1, abs.tol = 1e-06, ...)Arguments
- x
Input value(s) in range [low,high] to translate -Inf to Inf
- low
Lowest value in the range
- high
Highest value in the range
- alpha
Infinite value(s) to translate to range of [low, high]
- mean
logit-scale mean
- sd
logit-scale standard deviation
- abs.tol
absolute accuracy requested.
- ...
other parameters passed to
integrate()
Details
logit is given by:
logit(x, low, high) = log(x-low) - log(high-x)
which equals -log(1/p-1) with p = (x-low)/(high-low) but keeps
precision near the bounds; it is -Inf at x = low, Inf at
x = high (like qlogis()) and NaN outside [low, high].
expit is given by:
expit(p, low, high) = (high-low)/(1+exp(-alpha)) + low
so expit(-Inf) = low and expit(Inf) = high.
The logitNormInfo() gives the mean, variance and coefficient of
variability on the untransformed scale.
See also
Other Special functions:
boxCox(),
delay(),
erf(),
gammap(),
gammapDer(),
gammapInv(),
gammaq(),
gammaqInv(),
lowergamma(),
mexpit(),
mlogit(),
phi(),
phiU(),
probit(),
uppergamma()
