Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
The log of the Student-t density for the given y, nu, mean, and scale parameter.
The scale parameter must be greater than 0.
\begin{eqnarray*} y &\sim& t_{\nu} (\mu, \sigma^2) \\ \log (p (y \, |\, \nu, \mu, \sigma) ) &=& \log \left( \frac{\Gamma((\nu + 1) /2)} {\Gamma(\nu/2)\sqrt{\nu \pi} \sigma} \left( 1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2 \right)^{-(\nu + 1)/2} \right) \\ &=& \log( \Gamma( (\nu+1)/2 )) - \log (\Gamma (\nu/2) - \frac{1}{2} \log(\nu \pi) - \log(\sigma) -\frac{\nu + 1}{2} \log (1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2) \end{eqnarray*}
T_y_cl | type of scalar |
T_dof_cl | type of degrees of freedom |
T_loc_cl | type of location |
T_scale_cl | type of scale |
y | A scalar variable. |
nu | Degrees of freedom. |
mu | The mean of the Student-t distribution. |
sigma | The scale parameter of the Student-t distribution. |
std::domain_error | if sigma is not greater than 0. |
std::domain_error | if nu is not greater than 0. |
Definition at line 51 of file student_t_lpdf.hpp.