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

◆ inv_cloglog() [2/7]

template<typename T_x , typename = require_all_kernel_expressions_and_none_scalar_t<T_x>>
auto stan::math::inv_cloglog ( T_x &&  x)
inline

The inverse complementary log-log function.

The function is defined by

inv_cloglog(x) = 1 - exp(-exp(x)).

This function can be used to implement the inverse link function for complementary-log-log regression.

\[ \mbox{inv\_cloglog}(y) = \begin{cases} \mbox{cloglog}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{inv\_cloglog}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{cloglog}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]

\[ \mbox{cloglog}^{-1}(y) = 1 - \exp \left( - \exp(y) \right) \]

\[ \frac{\partial \, \mbox{cloglog}^{-1}(y)}{\partial y} = \exp(y-\exp(y)) \]

Template Parameters
T_xtype of input kernel generator expression x
Parameters
xArgument.
Returns
Inverse complementary log-log of the argument.

Definition at line 53 of file inv_cloglog.hpp.