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

◆ scaled_inv_chi_square_log() [1/2]

template<bool propto, typename T_y , typename T_dof , typename T_scale >
return_type_t< T_y, T_dof, T_scale > stan::math::scaled_inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const T_scale &  s 
)

The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter.

\begin{eqnarray*} y &\sim& \mbox{\sf{Inv-}}\chi^2(\nu, s^2) \\ \log (p (y \, |\, \nu, s)) &=& \log \left( \frac{(\nu / 2)^{\nu / 2}}{\Gamma (\nu / 2)} s^\nu y^{- (\nu / 2 + 1)} \exp^{-\nu s^2 / (2y)} \right) \\ &=& \frac{\nu}{2} \log(\frac{\nu}{2}) - \log (\Gamma (\nu / 2)) + \nu \log(s) - (\frac{\nu}{2} + 1) \log(y) - \frac{\nu s^2}{2y} \\ & & \mathrm{ where } \; y > 0 \end{eqnarray*}

Deprecated:
use scaled_inv_chi_square_lpdf
Parameters
yA scalar variable.
nuDegrees of freedom.
sScale parameter.
Exceptions
std::domain_errorif nu is not greater than 0
std::domain_errorif s is not greater than 0.
std::domain_errorif y is not greater than 0.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.

Definition at line 34 of file scaled_inv_chi_square_log.hpp.