The logit and inverse-logit (also called the logistic function) are provided.
This object contains real values that will be transformed to the interval [0,1].
This object contains of probabilities p in the interval [0,1] that will be transformed to the real line.
logit function is the inverse of the sigmoid or logistic
function, and transforms a continuous value (usually probability
p) in the interval [0,1] to the real line (where it is usually
the logarithm of the odds). The
logit function is log(p / (1 - p)).
invlogit function (called either the inverse logit or the
logistic function) transforms a real number (usually the logarithm of
the odds) to a value (usually probability p) in the interval
invlogit function is 1
/ (1 + exp(-x)).
If p is a probability, then p/(1-p) is the
corresponding odds, while the
logit of p is the logarithm
of the odds. The difference between the logits of two probabilities is
the logarithm of the odds ratio. The derivative of probability p
in a logistic function (such as
invlogit) is: (d / dx) = p * (1 - p).
In the LaplacesDemon package, it is common to re-parameterize a model
so that a parameter that should be in an interval can be updated from
the real line by using the
interval function provides an
alternative. For example, consider a parameter theta
that must be in the interval [0,1]. The algorithms in
VariationalBayes are unaware of the desired interval,
and may attempt theta outside of this interval. One
solution is to have the algorithms update
logit(theta) is manipulated by the
algorithm, it is transformed via
invlogit(theta) in the model
specification function, where theta in [0,1].
invlogit returns probability
1 2 3 4