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

◆ prob_free()

template<typename T >
T stan::math::prob_free ( const T &  y)
inline

Return the free scalar that when transformed to a probability produces the specified scalar.

The function that reverses the constraining transform specified in prob_constrain(T) is the logit function,

\(f^{-1}(y) = \mbox{logit}(y) = \frac{1 - y}{y}\).

Template Parameters
Ttype of constrained value
Parameters
yconstrained value
Returns
corresponding unconstrained value
Exceptions
std::domain_errorif y is not in (0, 1)

Definition at line 27 of file prob_free.hpp.