Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ inv_logit() [4/6]

double stan::math::inv_logit ( double  a)
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} \]

Parameters
aArgument.
Returns
Inverse logit of argument.

Definition at line 51 of file inv_logit.hpp.