Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Returns the inverse logit function applied to the argument.
The inverse logit function is defined by
\(\mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(-x)}\).
This function can be used to implement the inverse link function for logistic regression.
The inverse to this function is logit
.
\[ \mbox{inv\_logit}(y) = \begin{cases} \mbox{logit}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]
\[ \frac{\partial\, \mbox{inv\_logit}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{logit}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]
\[ \mbox{logit}^{-1}(y) = \frac{1}{1 + \exp(-y)} \]
\[ \frac{\partial \, \mbox{logit}^{-1}(y)}{\partial y} = \frac{\exp(y)}{(\exp(y)+1)^2} \]
a | Argument. |
Definition at line 51 of file inv_logit.hpp.