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

◆ prob_constrain() [1/3]

template<typename T >
T stan::math::prob_constrain ( const T &  x)
inline

Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar.

The transform is the inverse logit,

\(f(x) = \mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(x)}\).

Template Parameters
Ttype of scalar
Parameters
[in]xunconstrained value
Returns
result constrained to fall in (0, 1)

Definition at line 26 of file prob_constrain.hpp.