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

◆ log_inv_logit_diff() [6/10]

template<typename T1 , typename T2 , require_all_arithmetic_t< T1, T2 > * = nullptr>
return_type_t< T1, T2 > stan::math::log_inv_logit_diff ( const T1 &  x,
const T2 &  y 
)
inline

Returns the natural logarithm of the difference of the inverse logits of the specified arguments.

\[ \mathrm{log\_inv\_logit\_diff}(x,y) = \ln\left(\frac{1}{1+\exp(-x)}-\frac{1}{1+\exp(-y)}\right) \]

\[ \frac{\partial }{\partial x} = -\frac{e^x}{e^y-e^x}-\frac{e^x}{e^x+1} \]

\[ \frac{\partial }{\partial x} = -\frac{e^y}{e^x-e^y}-\frac{e^y}{e^y+1} \]

Template Parameters
T1type of x argument
T2type of y argument
Parameters
xfirst argument
ysecond argument
Returns
Result of log difference of inverse logits of arguments.

Definition at line 37 of file log_inv_logit_diff.hpp.