return_type_t< T_y_cl, T_dof_cl, T_scale_cl > stan::math::scaled_inv_chi_square_lpdf |
( |
const T_y_cl & |
y, |
|
|
const T_dof_cl & |
nu, |
|
|
const T_scale_cl & |
s |
|
) |
| |
|
inline |
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*}
- Template Parameters
-
T_y_cl | type of random variable |
T_dof_cl | type of degrees of freedom |
T_Scale_cl | type of scale |
- Parameters
-
y | random variable |
nu | degrees of freedom |
s | Scale parameter. |
- Exceptions
-
std::domain_error | if nu is not greater than 0 |
std::domain_error | if s is not greater than 0. |
std::domain_error | if y is not greater than 0. |
Definition at line 43 of file scaled_inv_chi_square_lpdf.hpp.