Stan  1.0
probability, sampling & optimization
Classes | Functions | Variables
stan::prob Namespace Reference

Templated probability distributions. More...

Classes

struct  include_summand
 Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation. More...
 

Functions

template<typename T >
void autocorrelation (const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void autocorrelation (const std::vector< T > &y, std::vector< T > &ac)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result. More...
 
template<typename T >
void autocovariance (const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void autocovariance (const std::vector< T > &y, std::vector< T > &acov)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result. More...
 
template<bool propto, typename T_prob , typename T_prior_sample_size , class Policy >
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha, const Policy &)
 The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha. More...
 
template<bool propto, typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 
template<typename T_prob , typename T_prior_sample_size , class Policy >
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha, const Policy &)
 
template<typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S, const Policy &)
 The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S, const Policy &)
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<typename T_shape >
T_shape do_lkj_constant (const T_shape &eta, const unsigned int &K)
 
template<bool propto, typename T_covar , typename T_shape , class Policy >
boost::math::tools::promote_args< T_covar, T_shape >::type lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta, const Policy &)
 
template<bool propto, typename T_covar , typename T_shape >
boost::math::tools::promote_args< T_covar, T_shape >::type lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
template<typename T_covar , typename T_shape , class Policy >
boost::math::tools::promote_args< T_covar, T_shape >::type lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta, const Policy &)
 
template<typename T_covar , typename T_shape >
boost::math::tools::promote_args< T_covar, T_shape >::type lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_shape >::type lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta, const Policy &)
 
template<bool propto, typename T_y , typename T_shape >
boost::math::tools::promote_args< T_y, T_shape >::type lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
template<typename T_y , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_shape >::type lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta, const Policy &)
 
template<typename T_y , typename T_shape >
boost::math::tools::promote_args< T_y, T_shape >::type lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta, const Policy &)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta, const Policy &)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Policy &)
 The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix. More...
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L)
 
template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Policy &)
 
template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Policy &)
 y can have multiple rows (observations) and columns (on variables) More...
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L)
 
template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Policy &)
 
template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 The log of the multivariate normal density for the given y, mu, and variance matrix. More...
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 y can have multiple rows (observations) and columns (on variables) More...
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args< T_y, T_loc, T_covar >::type multi_normal_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_loc, T_scale >::type multi_student_t_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const T_dof &nu, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 Return the log of the multivariate Student t distribution at the specified arguments. More...
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_loc, T_scale >::type multi_student_t_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const T_dof &nu, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_loc, T_scale >::type multi_student_t_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const T_dof &nu, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Policy &)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_loc, T_scale >::type multi_student_t_log (const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y, const T_dof &nu, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S, const Policy &)
 The log of the Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S, const Policy &)
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<bool propto, typename T_prob , class Policy >
boost::math::tools::promote_args< T_prob >::type categorical_log (const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Policy &)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args< T_prob >::type categorical_log (const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob , class Policy >
boost::math::tools::promote_args< T_prob >::type categorical_log (const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Policy &)
 
template<typename T_prob >
boost::math::tools::promote_args< T_prob >::type categorical_log (const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<bool propto, typename T_prob , class Policy >
boost::math::tools::promote_args< T_prob >::type multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Policy &)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args< T_prob >::type multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob , class Policy >
boost::math::tools::promote_args< T_prob >::type multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Policy &)
 
template<typename T_prob >
boost::math::tools::promote_args< T_prob >::type multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta, const Policy &)
 The log of the beta density for the specified scalar(s) given the specified sample size(s). More...
 
template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta, const Policy &)
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_cdf (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta, const Policy &)
 Calculates the beta cumulative distribution function for the given variate and scale variables. More...
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_cdf (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s). More...
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type cauchy_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 Calculates the cauchy cumulative distribution function for the given variate, location, and scale. More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type cauchy_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_dof , class Policy >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu, const Policy &)
 The log of a chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu)
 
template<typename T_y , typename T_dof , class Policy >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu, const Policy &)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type double_exponential_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 Calculates the double exponential cumulative density function. More...
 
template<typename T_y , typename T_loc , typename T_scale >
boost::math::tools::promote_args< T_y, T_loc, T_scale >::type double_exponential_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_inv_scale , class Policy >
return_type< T_y, T_inv_scale >::type exponential_log (const T_y &y, const T_inv_scale &beta, const Policy &)
 The log of an exponential density for y with the specified inverse scale parameter. More...
 
template<bool propto, typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >::type exponential_log (const T_y &y, const T_inv_scale &beta)
 
template<typename T_y , typename T_inv_scale , class Policy >
return_type< T_y, T_inv_scale >::type exponential_log (const T_y &y, const T_inv_scale &beta, const Policy &)
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >::type exponential_log (const T_y &y, const T_inv_scale &beta)
 
template<typename T_y , typename T_inv_scale , class Policy >
boost::math::tools::promote_args< T_y, T_inv_scale >::type exponential_cdf (const T_y &y, const T_inv_scale &beta, const Policy &)
 Calculates the exponential cumulative distribution function for the given y and beta. More...
 
template<typename T_y , typename T_inv_scale >
boost::math::tools::promote_args< T_y, T_inv_scale >::type exponential_cdf (const T_y &y, const T_inv_scale &beta)
 
template<bool propto, typename T_y , typename T_shape , typename T_inv_scale , class Policy >
return_type< T_y, T_shape, T_inv_scale >::type gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta, const Policy &)
 The log of a gamma density for y with the specified shape and inverse scale parameters. More...
 
template<bool propto, typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape, T_inv_scale >::type gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_y , typename T_shape , typename T_inv_scale , class Policy >
return_type< T_y, T_shape, T_inv_scale >::type gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta, const Policy &)
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape, T_inv_scale >::type gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
template<bool propto, typename T_y , typename T_dof , class Policy >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu, const Policy &)
 The log of an inverse chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu)
 
template<typename T_y , typename T_dof , class Policy >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu, const Policy &)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale , class Policy >
return_type< T_y, T_shape, T_scale >::type inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta, const Policy &)
 The log of an inverse gamma density for y with the specified shape and scale parameters. More...
 
template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape, T_scale >::type inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
template<typename T_y , typename T_shape , typename T_scale , class Policy >
return_type< T_y, T_shape, T_scale >::type inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta, const Policy &)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape, T_scale >::type inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale >::type lognormal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
boost::math::tools::promote_args< T_y, T_loc, T_scale >::type lognormal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s). More...
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_loc, T_scale >::type normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const Policy &)
 Calculates the normal cumulative distribution function for the given variate, location, and scale. More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc, T_scale >::type normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_loc , typename T_scale , class RNG >
double normal_random (const T_loc &mu, const T_scale &sigma, RNG &rng)
 
template<bool propto, typename T_y , typename T_scale , typename T_shape , class Policy >
return_type< T_y, T_scale, T_shape >::type pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha, const Policy &)
 
template<bool propto, typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale, T_shape >::type pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<typename T_y , typename T_scale , typename T_shape , class Policy >
return_type< T_y, T_scale, T_shape >::type pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha, const Policy &)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale, T_shape >::type pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s, const Policy &)
 The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More...
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
template<typename T_y , typename T_dof , typename T_scale , class Policy >
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s, const Policy &)
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma, const Policy &)
 The log of the Student-t density for the given y, nu, mean, and scale parameter. More...
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_alpha, T_beta >::type trunc_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_alpha &alpha, const T_beta &beta, const Policy &)
 The log of the truncated normal density for the given y, mean, and standard deviation. More...
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_alpha, T_beta >::type trunc_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_alpha &alpha, const T_beta &beta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta , class Policy >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_alpha, T_beta >::type trunc_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_alpha &alpha, const T_beta &beta, const Policy &)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta >
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_alpha, T_beta >::type trunc_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_alpha &alpha, const T_beta &beta)
 
template<bool propto, typename T_y , typename T_low , typename T_high , class Policy >
return_type< T_y, T_low, T_high >::type uniform_log (const T_y &y, const T_low &alpha, const T_high &beta, const Policy &)
 The log of a uniform density for the given y, lower, and upper bound. More...
 
template<bool propto, typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low, T_high >::type uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<typename T_y , typename T_low , typename T_high , class Policy >
return_type< T_y, T_low, T_high >::type uniform_log (const T_y &y, const T_low &alpha, const T_high &beta, const Policy &)
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low, T_high >::type uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale , class Policy >
return_type< T_y, T_shape, T_scale >::type weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma, const Policy &)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape, T_scale >::type weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale , class Policy >
return_type< T_y, T_shape, T_scale >::type weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape, T_scale >::type weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale , class Policy >
boost::math::tools::promote_args< T_y, T_shape, T_scale >::type weibull_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma, const Policy &)
 
template<typename T_y , typename T_shape , typename T_scale >
boost::math::tools::promote_args< T_y, T_shape, T_scale >::type weibull_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<bool propto, typename T_n , typename T_prob , class Policy >
return_type< T_prob >::type bernoulli_log (const T_n &n, const T_prob &theta, const Policy &)
 
template<bool propto, typename T_y , typename T_prob >
return_type< T_prob >::type bernoulli_log (const T_y &n, const T_prob &theta)
 
template<typename T_y , typename T_prob , class Policy >
return_type< T_prob >::type bernoulli_log (const T_y &n, const T_prob &theta, const Policy &)
 
template<typename T_y , typename T_prob >
return_type< T_prob >::type bernoulli_log (const T_y &n, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_prob , class Policy >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta, const Policy &)
 
template<bool propto, typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
template<typename T_n , typename T_prob , class Policy >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta, const Policy &)
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 , class Policy >
return_type< T_size1, T_size2 >::type beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta, const Policy &)
 
template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >::type beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 , class Policy >
return_type< T_size1, T_size2 >::type beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta, const Policy &)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >::type beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<bool propto, typename T_n , typename T_N , typename T_prob , class Policy >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta, const Policy &)
 
template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<typename T_n , typename T_N , typename T_prob , class Policy >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta, const Policy &)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b , class Policy >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b, const Policy &)
 
template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
template<typename T_n , typename T_N , typename T_a , typename T_b , class Policy >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b, const Policy &)
 
template<typename T_n , typename T_N , typename T_a , typename T_b >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
template<bool propto, typename T_n , typename T_shape , typename T_inv_scale , class Policy >
return_type< T_shape, T_inv_scale >::type neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta, const Policy &)
 
template<bool propto, typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape, T_inv_scale >::type neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_n , typename T_shape , typename T_inv_scale , class Policy >
return_type< T_shape, T_inv_scale >::type neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta, const Policy &)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape, T_inv_scale >::type neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T >
log_inv_logit_diff (const T &alpha, const T &beta)
 
template<bool propto, typename T_lambda , typename T_cut , class Policy >
boost::math::tools::promote_args< T_lambda, T_cut >::type ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c, const Policy &)
 Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model. More...
 
template<bool propto, typename T_lambda , typename T_cut >
boost::math::tools::promote_args< T_lambda, T_cut >::type ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 
template<typename T_lambda , typename T_cut , class Policy >
boost::math::tools::promote_args< T_lambda, T_cut >::type ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c, const Policy &)
 
template<typename T_lambda , typename T_cut >
boost::math::tools::promote_args< T_lambda, T_cut >::type ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 
template<bool propto, typename T_n , typename T_rate , class Policy >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda, const Policy &)
 
template<bool propto, typename T_n , typename T_rate >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda)
 
template<typename T_n , typename T_rate , class Policy >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda, const Policy &)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda)
 
template<bool propto, typename T_n , typename T_log_rate , class Policy >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha, const Policy &)
 
template<bool propto, typename T_n , typename T_log_rate >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
template<typename T_n , typename T_log_rate , class Policy >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha, const Policy &)
 
template<typename T_n , typename T_log_rate >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
template<typename T >
bool factor_cov_matrix (Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma)
 This function is intended to make starting values, given a covariance matrix Sigma. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 This is the function that should be called prior to evaluating the density of any elliptical distribution. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 A generally worse alternative to call prior to evaluating the density of an elliptical distribution. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
 Builds a covariance matrix from CPCs and standard deviations. More...
 
template<typename T >
const Eigen::Array< T, Eigen::Dynamic, 1 > make_nu (const T eta, const size_t K)
 This function calculates the degrees of freedom for the t distribution that corresponds to the shape parameter in the Lewandowski et. More...
 
template<typename T >
identity_constrain (T x)
 Returns the result of applying the identity constraint transform to the input. More...
 
template<typename T >
identity_constrain (const T x, T &lp)
 Returns the result of applying the identity constraint transform to the input and increments the log probability reference with the log absolute Jacobian determinant. More...
 
template<typename T >
identity_free (const T y)
 Returns the result of applying the inverse of the identity constraint transform to the input. More...
 
template<typename T >
positive_constrain (const T x)
 Return the positive value for the specified unconstrained input. More...
 
template<typename T >
positive_constrain (const T x, T &lp)
 Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant. More...
 
template<typename T >
positive_free (const T y)
 Return the unconstrained value corresponding to the specified positive-constrained value. More...
 
template<typename T , typename TL >
lb_constrain (const T x, const TL lb)
 Return the lower-bounded value for the specified unconstrained input and specified lower bound. More...
 
template<typename T , typename TL >
boost::math::tools::promote_args< T, TL >::type lb_constrain (const T x, const TL lb, T &lp)
 Return the lower-bounded value for the speicifed unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T , typename TL >
boost::math::tools::promote_args< T, TL >::type lb_free (const T y, const TL lb)
 Return the unconstrained value that produces the specified lower-bound constrained value. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args< T, TU >::type ub_constrain (const T x, const TU ub)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args< T, TU >::type ub_constrain (const T x, const TU ub, T &lp)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args< T, TU >::type ub_free (const T y, const TU ub)
 Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args< T, TL, TU >::type lub_constrain (const T x, TL lb, TU ub)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args< T, TL, TU >::type lub_constrain (const T x, const TL lb, const TU ub, T &lp)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds and increment the specified log probability with the log absolute Jacobian determinant. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args< T, TL, TU >::type lub_free (const T y, TL lb, TU ub)
 Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar given the specified bounds. More...
 
template<typename T >
prob_constrain (const T x)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar. More...
 
template<typename T >
prob_constrain (const T x, T &lp)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
prob_free (const T y)
 Return the free scalar that when transformed to a probability produces the specified scalar. More...
 
template<typename T >
corr_constrain (const T x)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
template<typename T >
corr_constrain (const T x, T &lp)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
template<typename T >
corr_free (const T y)
 Return the unconstrained scalar that when transformed to a valid correlation produces the specified value. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the simplex corresponding to the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)
 Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > simplex_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an unconstrained vector that when transformed produces the specified simplex. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing positive ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type k)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type k, T &lp)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > corr_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations that define the specified correlation matrix when transformed. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type K)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type K, T &lp)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > cov_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K specified matrix is freed to return a vector of size K + (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k, T &lp)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant. More...
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > cov_matrix_free_lkj (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix. More...
 

Variables

const double CONSTRAINT_TOLERANCE = 1E-8
 

Detailed Description

Templated probability distributions.

All paramaterizations are based on Bayesian Data Analysis. Error handling for the distributions is described in Error Handling Policies.

Function Documentation

◆ autocorrelation() [1/2]

template<typename T >
void stan::prob::autocorrelation ( const std::vector< T > &  y,
std::vector< T > &  ac 
)

Write autocorrelation estimates for every lag for the specified input sequence into the specified result.

The return vector be resized to the same length as the input sequence with lags given by array index.

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

This method is just a light wrapper around the three-argument autocorrelation function

Template Parameters
TScalar type.
Parameters
yInput sequence.
acAutocorrelations.

Definition at line 123 of file autocorrelation.hpp.

◆ autocorrelation() [2/2]

template<typename T >
void stan::prob::autocorrelation ( const std::vector< T > &  y,
std::vector< T > &  ac,
Eigen::FFT< T > &  fft 
)

Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine.

The return vector be resized to the same length as the input sequence with lags given by array index.

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

An FFT engine can be created for reuse for type double with:

    Eigen::FFT<double> fft;
Template Parameters
TScalar type.
Parameters
yInput sequence.
acAutocorrelations.
fftFFT engine instance.

Definition at line 53 of file autocorrelation.hpp.

◆ autocovariance() [1/2]

template<typename T >
void stan::prob::autocovariance ( const std::vector< T > &  y,
std::vector< T > &  acov 
)

Write autocovariance estimates for every lag for the specified input sequence into the specified result.

The return vector be resized to the same length as the input sequence with lags given by array index.

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

This method is just a light wrapper around the three-argument autocovariance function

Template Parameters
TScalar type.
Parameters
yInput sequence.
acovAutocovariances.

Definition at line 61 of file autocovariance.hpp.

◆ autocovariance() [2/2]

template<typename T >
void stan::prob::autocovariance ( const std::vector< T > &  y,
std::vector< T > &  acov,
Eigen::FFT< T > &  fft 
)

Write autocovariance estimates for every lag for the specified input sequence into the specified result using the specified FFT engine.

The return vector be resized to the same length as the input sequence with lags given by array index.

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

An FFT engine can be created for reuse for type double with:

    Eigen::FFT<double> fft;
Template Parameters
TScalar type.
Parameters
yInput sequence.
acovAutocovariance.
fftFFT engine instance.

Definition at line 32 of file autocovariance.hpp.

◆ bernoulli_log() [1/4]

template<bool propto, typename T_n , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::bernoulli_log ( const T_n &  n,
const T_prob &  theta,
const Policy &   
)

Definition at line 21 of file bernoulli.hpp.

◆ bernoulli_log() [2/4]

template<bool propto, typename T_y , typename T_prob >
return_type<T_prob>::type stan::prob::bernoulli_log ( const T_y &  n,
const T_prob &  theta 
)
inline

Definition at line 110 of file bernoulli.hpp.

◆ bernoulli_log() [3/4]

template<typename T_y , typename T_prob >
return_type<T_prob>::type stan::prob::bernoulli_log ( const T_y &  n,
const T_prob &  theta 
)
inline

Definition at line 129 of file bernoulli.hpp.

◆ bernoulli_log() [4/4]

template<typename T_y , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::bernoulli_log ( const T_y &  n,
const T_prob &  theta,
const Policy &   
)
inline

Definition at line 120 of file bernoulli.hpp.

◆ bernoulli_logit_log() [1/4]

template<bool propto, typename T_n , typename T_prob >
return_type<T_prob>::type stan::prob::bernoulli_logit_log ( const T_n &  n,
const T_prob &  theta 
)
inline

Definition at line 227 of file bernoulli.hpp.

◆ bernoulli_logit_log() [2/4]

template<typename T_n , typename T_prob >
return_type<T_prob>::type stan::prob::bernoulli_logit_log ( const T_n &  n,
const T_prob &  theta 
)
inline

Definition at line 249 of file bernoulli.hpp.

◆ bernoulli_logit_log() [3/4]

template<bool propto, typename T_n , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::bernoulli_logit_log ( const T_n &  n,
const T_prob &  theta,
const Policy &   
)

Definition at line 142 of file bernoulli.hpp.

◆ bernoulli_logit_log() [4/4]

template<typename T_n , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::bernoulli_logit_log ( const T_n &  n,
const T_prob &  theta,
const Policy &   
)
inline

Definition at line 238 of file bernoulli.hpp.

◆ beta_binomial_log() [1/4]

template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type<T_size1,T_size2>::type stan::prob::beta_binomial_log ( const T_n &  n,
const T_N &  N,
const T_size1 &  alpha,
const T_size2 &  beta 
)

Definition at line 99 of file beta_binomial.hpp.

◆ beta_binomial_log() [2/4]

template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type<T_size1,T_size2>::type stan::prob::beta_binomial_log ( const T_n &  n,
const T_N &  N,
const T_size1 &  alpha,
const T_size2 &  beta 
)

Definition at line 123 of file beta_binomial.hpp.

◆ beta_binomial_log() [3/4]

template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 , class Policy >
return_type<T_size1,T_size2>::type stan::prob::beta_binomial_log ( const T_n &  n,
const T_N &  N,
const T_size1 &  alpha,
const T_size2 &  beta,
const Policy &   
)

Definition at line 23 of file beta_binomial.hpp.

◆ beta_binomial_log() [4/4]

template<typename T_n , typename T_N , typename T_size1 , typename T_size2 , class Policy >
return_type<T_size1,T_size2>::type stan::prob::beta_binomial_log ( const T_n &  n,
const T_N &  N,
const T_size1 &  alpha,
const T_size2 &  beta,
const Policy &   
)
inline

Definition at line 112 of file beta_binomial.hpp.

◆ beta_cdf() [1/2]

template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_cdf ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta 
)

Definition at line 261 of file beta.hpp.

◆ beta_cdf() [2/2]

template<typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_cdf ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta,
const Policy &   
)

Calculates the beta cumulative distribution function for the given variate and scale variables.

Parameters
yA scalar variate.
alphaPrior sample size.
betaPrior sample size.
Returns
The beta cdf evaluated at the specified arguments.
Template Parameters
T_yType of y.
T_scale_succType of alpha.
T_scale_failType of beta.
PolicyError-handling policy.

Definition at line 222 of file beta.hpp.

◆ beta_log() [1/4]

template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_log ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta 
)
inline

Definition at line 186 of file beta.hpp.

◆ beta_log() [2/4]

template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_log ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta 
)
inline

Definition at line 201 of file beta.hpp.

◆ beta_log() [3/4]

template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_log ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta,
const Policy &   
)

The log of the beta density for the specified scalar(s) given the specified sample size(s).

y, alpha, or beta can each either be scalar or std::vector. Any vector inputs must be the same length.

The result log probability is defined to be the sum of the log probabilities for each observation/alpha/beta triple.

Prior sample sizes, alpha and beta, must be greater than 0.

Parameters
y(Sequence of) scalar(s).
alpha(Sequence of) prior sample size(s).
beta(Sequence of) prior sample size(s).
Returns
The log of the product of densities.
Template Parameters
T_yType of scalar outcome.
T_scale_succType of prior scale for successes.
T_scale_failType of prior scale for failures.
Error Policy: \n See @ref policy_page for details. Conditions: @li All parameters must not be NaN.
  • alpha must be positive and finite.
  • beta must be positive and finite.

Definition at line 40 of file beta.hpp.

◆ beta_log() [4/4]

template<typename T_y , typename T_scale_succ , typename T_scale_fail , class Policy >
return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_log ( const T_y &  y,
const T_scale_succ &  alpha,
const T_scale_fail &  beta,
const Policy &   
)

Definition at line 193 of file beta.hpp.

◆ binomial_log() [1/4]

template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type<T_prob>::type stan::prob::binomial_log ( const T_n &  n,
const T_N &  N,
const T_prob &  theta 
)
inline

Definition at line 97 of file binomial.hpp.

◆ binomial_log() [2/4]

template<typename T_n , typename T_N , typename T_prob >
return_type<T_prob>::type stan::prob::binomial_log ( const T_n &  n,
const T_N &  N,
const T_prob &  theta 
)
inline

Definition at line 123 of file binomial.hpp.

◆ binomial_log() [3/4]

template<bool propto, typename T_n , typename T_N , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::binomial_log ( const T_n &  n,
const T_N &  N,
const T_prob &  theta,
const Policy &   
)

Definition at line 22 of file binomial.hpp.

◆ binomial_log() [4/4]

template<typename T_n , typename T_N , typename T_prob , class Policy >
return_type<T_prob>::type stan::prob::binomial_log ( const T_n &  n,
const T_N &  N,
const T_prob &  theta,
const Policy &   
)
inline

Definition at line 110 of file binomial.hpp.

◆ categorical_log() [1/4]

template<bool propto, typename T_prob >
boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log ( const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type  n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta 
)
inline

Definition at line 49 of file categorical.hpp.

◆ categorical_log() [2/4]

template<typename T_prob >
boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log ( const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type  n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta 
)
inline

Definition at line 68 of file categorical.hpp.

◆ categorical_log() [3/4]

template<bool propto, typename T_prob , class Policy >
boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log ( const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type  n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Policy &   
)

Definition at line 19 of file categorical.hpp.

◆ categorical_log() [4/4]

template<typename T_prob , class Policy >
boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log ( const typename Eigen::Matrix< T_prob, Eigen::Dynamic, 1 >::size_type  n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Policy &   
)
inline

Definition at line 59 of file categorical.hpp.

◆ cauchy_cdf() [1/2]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)

Definition at line 209 of file cauchy.hpp.

◆ cauchy_cdf() [2/2]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Calculates the cauchy cumulative distribution function for the given variate, location, and scale.

$\frac{1}{\pi}\arctan\left(\frac{y-\mu}{\sigma}\right) + \frac{1}{2}$

Errors are configured by policy. All variables must be finite and the scale must be strictly greater than zero.

Parameters
yA scalar variate.
muThe location parameter.
sigmaThe scale parameter.
Returns

Definition at line 179 of file cauchy.hpp.

◆ cauchy_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 140 of file cauchy.hpp.

◆ cauchy_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 156 of file cauchy.hpp.

◆ cauchy_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s).

y, mu, or sigma can each either be scalar or std::vector. Any vector inputs must be the same length.

The result log probability is defined to be the sum of the log probabilities for each observation/mu/sigma triple.

Parameters
y(Sequence of) scalar(s).
mu(Sequence of) location(s).
sigma(Sequence of) scale(s).
Returns
The log of the product of densities.
Template Parameters
T_yType of scalar outcome.
T_locType of location.
T_scaleType of scale.
Error Policy: \n See @ref policy_page for details. Conditions: @li All parameters must not be NaN.
  • sigma must be positive.

Definition at line 36 of file cauchy.hpp.

◆ cauchy_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 148 of file cauchy.hpp.

◆ chi_square_log() [1/4]

template<bool propto, typename T_y , typename T_dof >
return_type<T_y,T_dof>::type stan::prob::chi_square_log ( const T_y &  y,
const T_dof &  nu 
)
inline

Definition at line 99 of file chi_square.hpp.

◆ chi_square_log() [2/4]

template<typename T_y , typename T_dof >
return_type<T_y,T_dof>::type stan::prob::chi_square_log ( const T_y &  y,
const T_dof &  nu 
)
inline

Definition at line 116 of file chi_square.hpp.

◆ chi_square_log() [3/4]

template<bool propto, typename T_y , typename T_dof , class Policy >
return_type<T_y,T_dof>::type stan::prob::chi_square_log ( const T_y &  y,
const T_dof &  nu,
const Policy &   
)

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

The degrees of freedom prarameter must be greater than 0. y must be greater than or equal to 0.

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

Parameters
yA scalar variable.
nuDegrees of freedom.
Exceptions
std::domain_errorif nu is not greater than or equal to 0
std::domain_errorif y is not greater than or equal to 0.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.

Definition at line 38 of file chi_square.hpp.

◆ chi_square_log() [4/4]

template<typename T_y , typename T_dof , class Policy >
return_type<T_y,T_dof>::type stan::prob::chi_square_log ( const T_y &  y,
const T_dof &  nu,
const Policy &   
)
inline

Definition at line 108 of file chi_square.hpp.

◆ corr_constrain() [1/2]

template<typename T >
T stan::prob::corr_constrain ( const T  x)
inline

Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive).

The transform used is the hyperbolic tangent function,

$f(x) = \tanh x = \frac{\exp(2x) - 1}{\exp(2x) + 1}$.

Parameters
xScalar input.
Returns
Result of transforming the input to fall between -1 and 1.
Template Parameters
TType of scalar.

Definition at line 924 of file transform.hpp.

◆ corr_constrain() [2/2]

template<typename T >
T stan::prob::corr_constrain ( const T  x,
T &  lp 
)
inline

Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive).

The transform used is as specified for corr_constrain(T). The log absolute Jacobian determinant is

$\log | \frac{d}{dx} \tanh x | = \log (1 - \tanh^2 x)$.

Template Parameters
TType of scalar.

Definition at line 942 of file transform.hpp.

◆ corr_free()

template<typename T >
T stan::prob::corr_free ( const T  y)
inline

Return the unconstrained scalar that when transformed to a valid correlation produces the specified value.

This function inverts the transform defined for corr_constrain(T), which is the inverse hyperbolic tangent,

$ f^{-1}(y) = \mbox{atanh}\, y = \frac{1}{2} \log \frac{y + 1}{y - 1}$.

Parameters
yCorrelation scalar input.
Returns
Free scalar that transforms to the specified input.
Template Parameters
TType of scalar.

Definition at line 967 of file transform.hpp.

◆ corr_matrix_constrain() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::corr_matrix_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type  k 
)

Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.

The input vector must be of length ${k \choose 2} = \frac{k(k-1)}{2}$. The values in the input vector represent unconstrained (partial) correlations among the dimensions.

The transform based on partial correlations is as specified in

  • Lewandowski, Daniel, Dorota Kurowicka, and Harry Joe. 2009. Generating random correlation matrices based on vines and extended onion method. Journal of Multivariate Analysis 100:1989–-2001.

The free vector entries are first constrained to be valid correlation values using corr_constrain(T).

Parameters
xVector of unconstrained partial correlations.
kDimensionality of returned correlation matrix.
Template Parameters
TType of scalar.
Exceptions
std::invalid_argumentif x is not a valid correlation matrix.

Definition at line 1270 of file transform.hpp.

◆ corr_matrix_constrain() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::corr_matrix_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type  k,
T &  lp 
)

Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.

The input vector must be of length ${k \choose 2} = \frac{k(k-1)}{2}$. The values in the input vector represent unconstrained (partial) correlations among the dimensions.

The transform is as specified for corr_matrix_constrain(Matrix,size_t); the paper it cites also defines the Jacobians for correlation inputs, which are composed with the correlation constrained Jacobians defined in corr_constrain(T,double) for this function.

Parameters
xVector of unconstrained partial correlations.
kDimensionality of returned correlation matrix.
lpLog probability reference to increment.
Template Parameters
TType of scalar.

Definition at line 1303 of file transform.hpp.

◆ corr_matrix_free()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::corr_matrix_free ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  y)

Return the vector of unconstrained partial correlations that define the specified correlation matrix when transformed.

The constraining transform is defined as for corr_matrix_constrain(Matrix,size_t). The inverse transform in this function is simpler in that it only needs to compute the $k \choose 2$ partial correlations and then free those.

Parameters
yThe correlation matrix to free.
Returns
Vector of unconstrained values that produce the specified correlation matrix when transformed.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif the correlation matrix has no elements or is not a square matrix.
std::runtime_errorif the correlation matrix cannot be factorized by factor_cov_matrix() or if the sds returned by factor_cov_matrix() on log scale are unconstrained.

Definition at line 1339 of file transform.hpp.

◆ cov_matrix_constrain() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type  K 
)

Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2).

See cov_matrix_free() for the inverse transform.

Parameters
xThe vector to convert to a covariance matrix.
KThe number of rows and columns of the resulting covariance matrix.
Exceptions
std::domain_errorif (x.size() != K + (K choose 2)).

Definition at line 1382 of file transform.hpp.

◆ cov_matrix_constrain() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
typename Eigen::Matrix< T, Eigen::Dynamic, 1 >::size_type  K,
T &  lp 
)

Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2).

See cov_matrix_free() for the inverse transform.

Parameters
xThe vector to convert to a covariance matrix.
KThe dimensions of the resulting covariance matrix.
lpReference
Exceptions
std::domain_errorif (x.size() != K + (K choose 2)).

Definition at line 1416 of file transform.hpp.

◆ cov_matrix_constrain_lkj() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain_lkj ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
size_t  k 
)

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values.

The input vector must be of length $k \choose 2 + k$. The first $k \choose 2$ values in the input represent unconstrained (partial) correlations and the last $k$ are unconstrained standard deviations of the dimensions.

The transform scales the correlation matrix transform defined in corr_matrix_constrain(Matrix,size_t) with the constrained deviations.

Parameters
xInput vector of unconstrained partial correlations and standard deviations.
kDimensionality of returned covariance matrix.
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.
Template Parameters
TType of scalar.

Definition at line 1511 of file transform.hpp.

◆ cov_matrix_constrain_lkj() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain_lkj ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
size_t  k,
T &  lp 
)

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant.


The transform is defined as for cov_matrix_constrain(Matrix,size_t).

The log absolute Jacobian determinant is derived by composing the log absolute Jacobian determinant for the underlying correlation matrix as defined in cov_matrix_constrain(Matrix,size_t,T&) with the Jacobian of the transfrom of the correlation matrix into a covariance matrix by scaling by standard deviations.

Parameters
xInput vector of unconstrained partial correlations and standard deviations.
kDimensionality of returned covariance matrix.
lpLog probability reference to increment.
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.
Template Parameters
TType of scalar.

Definition at line 1550 of file transform.hpp.

◆ cov_matrix_free()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::cov_matrix_free ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  y)

The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K specified matrix is freed to return a vector of size K + (K choose 2).


This is the inverse of the cov_matrix_constrain() function so that for any finite vector x of size K

  • (K choose 2),

x == cov_matrix_free(cov_matrix_constrain(x,K)).

In order for this round-trip to work (and really for this function to work), the symmetric view of its lower-triangular view must be positive definite.

Parameters
yMatrix of dimensions K by K such that he symmetric view of the lower-triangular view is positive definite.
Returns
Vector of size K plus (K choose 2) in (-inf,inf) that produces
Exceptions
std::domain_errorif y is not square, has zero dimensionality, or has a non-positive diagonal element.

Definition at line 1464 of file transform.hpp.

◆ cov_matrix_free_lkj()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::cov_matrix_free_lkj ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  y)

Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix.

The constraining transform is defined as for cov_matrix_constrain(Matrix,size_t). The inverse first factors out the deviations, then applies the freeing transfrom of corr_matrix_free(Matrix&).

Parameters
yCovariance matrix to free.
Returns
Vector of unconstrained values that transforms to the specified covariance matrix.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif the correlation matrix has no elements or is not a square matrix.
std::runtime_errorif the correlation matrix cannot be factorized by factor_cov_matrix()

Definition at line 1584 of file transform.hpp.

◆ dirichlet_log() [1/4]

template<bool propto, typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args<T_prob,T_prior_sample_size>::type stan::prob::dirichlet_log ( const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &  alpha 
)
inline

Definition at line 66 of file dirichlet.hpp.

◆ dirichlet_log() [2/4]

template<typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args<T_prob,T_prior_sample_size>::type stan::prob::dirichlet_log ( const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &  alpha 
)
inline

Definition at line 85 of file dirichlet.hpp.

◆ dirichlet_log() [3/4]

template<bool propto, typename T_prob , typename T_prior_sample_size , class Policy >
boost::math::tools::promote_args<T_prob,T_prior_sample_size>::type stan::prob::dirichlet_log ( const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &  alpha,
const Policy &   
)

The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha.

Each element of alpha must be greater than 0. Each element of theta must be greater than or 0. Theta sums to 1.

\begin{eqnarray*} \theta &\sim& \mbox{\sf{Dirichlet}} (\alpha_1, \ldots, \alpha_k) \\ \log (p (\theta \,|\, \alpha_1, \ldots, \alpha_k) ) &=& \log \left( \frac{\Gamma(\alpha_1 + \cdots + \alpha_k)}{\Gamma(\alpha_1) \cdots \Gamma(\alpha_k)} \theta_1^{\alpha_1 - 1} \cdots \theta_k^{\alpha_k - 1} \right) \\ &=& \log (\Gamma(\alpha_1 + \cdots + \alpha_k)) - \log(\Gamma(\alpha_1)) - \cdots - \log(\Gamma(\alpha_k)) + (\alpha_1 - 1) \log (\theta_1) + \cdots + (\alpha_k - 1) \log (\theta_k) \end{eqnarray*}

Parameters
thetaA scalar vector.
alphaPrior sample sizes.
Returns
The log of the Dirichlet density.
Exceptions
std::domain_errorif any element of alpha is less than or equal to 0.
std::domain_errorif any element of theta is less than 0.
std::domain_errorif the sum of theta is not 1.
Template Parameters
T_probType of scalar.
T_prior_sample_sizeType of prior sample sizes.

Definition at line 43 of file dirichlet.hpp.

◆ dirichlet_log() [4/4]

template<typename T_prob , typename T_prior_sample_size , class Policy >
boost::math::tools::promote_args<T_prob,T_prior_sample_size>::type stan::prob::dirichlet_log ( const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &  alpha,
const Policy &   
)
inline

Definition at line 76 of file dirichlet.hpp.

◆ do_lkj_constant()

template<typename T_shape >
T_shape stan::prob::do_lkj_constant ( const T_shape &  eta,
const unsigned int &  K 
)

Definition at line 19 of file lkj_corr.hpp.

◆ double_exponential_cdf() [1/2]

template<typename T_y , typename T_loc , typename T_scale >
boost::math::tools::promote_args<T_y,T_loc,T_scale>::type stan::prob::double_exponential_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)

Definition at line 197 of file double_exponential.hpp.

◆ double_exponential_cdf() [2/2]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Calculates the double exponential cumulative density function.

$ f(y|\mu,\sigma) = \begin{cases} \ \frac{1}{2} \exp\left(\frac{y-\mu}{\sigma}\right), \mbox{if } y < \mu \\ 1 - \frac{1}{2} \exp\left(-\frac{y-\mu}{\sigma}\right), \mbox{if } y \ge \mu \ \end{cases}$

Parameters
yA scalar variate.
muThe location parameter.
sigmaThe scale parameter.
Returns
The cumulative density function.

Definition at line 167 of file double_exponential.hpp.

◆ double_exponential_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)

Definition at line 127 of file double_exponential.hpp.

◆ double_exponential_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)

Definition at line 144 of file double_exponential.hpp.

◆ double_exponential_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Definition at line 22 of file double_exponential.hpp.

◆ double_exponential_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Definition at line 137 of file double_exponential.hpp.

◆ exponential_cdf() [1/2]

template<typename T_y , typename T_inv_scale >
boost::math::tools::promote_args<T_y,T_inv_scale>::type stan::prob::exponential_cdf ( const T_y &  y,
const T_inv_scale &  beta 
)
inline

Definition at line 159 of file exponential.hpp.

◆ exponential_cdf() [2/2]

template<typename T_y , typename T_inv_scale , class Policy >
boost::math::tools::promote_args<T_y,T_inv_scale>::type stan::prob::exponential_cdf ( const T_y &  y,
const T_inv_scale &  beta,
const Policy &   
)

Calculates the exponential cumulative distribution function for the given y and beta.

Inverse scale parameter must be greater than 0. y must be greater than or equal to 0.

Parameters
yA scalar variable.
betaInverse scale parameter.
Template Parameters
T_yType of scalar.
T_inv_scaleType of inverse scale.
PolicyError-handling policy.

Definition at line 130 of file exponential.hpp.

◆ exponential_log() [1/4]

template<bool propto, typename T_y , typename T_inv_scale >
return_type<T_y,T_inv_scale>::type stan::prob::exponential_log ( const T_y &  y,
const T_inv_scale &  beta 
)
inline

Definition at line 92 of file exponential.hpp.

◆ exponential_log() [2/4]

template<typename T_y , typename T_inv_scale >
return_type<T_y,T_inv_scale>::type stan::prob::exponential_log ( const T_y &  y,
const T_inv_scale &  beta 
)
inline

Definition at line 107 of file exponential.hpp.

◆ exponential_log() [3/4]

template<bool propto, typename T_y , typename T_inv_scale , class Policy >
return_type<T_y,T_inv_scale>::type stan::prob::exponential_log ( const T_y &  y,
const T_inv_scale &  beta,
const Policy &   
)

The log of an exponential density for y with the specified inverse scale parameter.

Inverse scale parameter must be greater than 0. y must be greater than or equal to 0.

\begin{eqnarray*} y &\sim& \mbox{\sf{Expon}}(\beta) \\ \log (p (y \,|\, \beta) ) &=& \log \left( \beta \exp^{-\beta y} \right) \\ &=& \log (\beta) - \beta y \\ & & \mathrm{where} \; y > 0 \end{eqnarray*}

Parameters
yA scalar variable.
betaInverse scale parameter.
Exceptions
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than or equal to 0.
Template Parameters
T_yType of scalar.
T_inv_scaleType of inverse scale.

Definition at line 45 of file exponential.hpp.

◆ exponential_log() [4/4]

template<typename T_y , typename T_inv_scale , class Policy >
return_type<T_y,T_inv_scale>::type stan::prob::exponential_log ( const T_y &  y,
const T_inv_scale &  beta,
const Policy &   
)
inline

Definition at line 100 of file exponential.hpp.

◆ factor_cov_matrix()

template<typename T >
bool stan::prob::factor_cov_matrix ( Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
Eigen::Array< T, Eigen::Dynamic, 1 > &  sds,
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)

This function is intended to make starting values, given a covariance matrix Sigma.

The transformations are hard coded as log for standard deviations and Fisher transformations (atanh()) of CPCs

Parameters
CPCsfill this unbounded
sdsfill this unbounded
Sigmacovariance matrix
Returns
false if any of the diagonals of Sigma are 0

Definition at line 42 of file transform.hpp.

◆ gamma_log() [1/4]

template<bool propto, typename T_y , typename T_shape , typename T_inv_scale >
return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_inv_scale &  beta 
)
inline

Definition at line 160 of file gamma.hpp.

◆ gamma_log() [2/4]

template<typename T_y , typename T_shape , typename T_inv_scale >
return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_inv_scale &  beta 
)
inline

Definition at line 176 of file gamma.hpp.

◆ gamma_log() [3/4]

template<bool propto, typename T_y , typename T_shape , typename T_inv_scale , class Policy >
return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_inv_scale &  beta,
const Policy &   
)

The log of a gamma density for y with the specified shape and inverse scale parameters.

Shape and inverse scale parameters must be greater than 0. y must be greater than or equal to 0.

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

Parameters
yA scalar variable.
alphaShape parameter.
betaInverse scale parameter.
Exceptions
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than or equal to 0.
Template Parameters
T_yType of scalar.
T_shapeType of shape.
T_inv_scaleType of inverse scale.

Definition at line 41 of file gamma.hpp.

◆ gamma_log() [4/4]

template<typename T_y , typename T_shape , typename T_inv_scale , class Policy >
return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_inv_scale &  beta,
const Policy &   
)
inline

Definition at line 168 of file gamma.hpp.

◆ hypergeometric_log() [1/4]

template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b >
double stan::prob::hypergeometric_log ( const T_n &  n,
const T_N &  N,
const T_a &  a,
const T_b &  b 
)
inline

Definition at line 89 of file hypergeometric.hpp.

◆ hypergeometric_log() [2/4]

template<typename T_n , typename T_N , typename T_a , typename T_b >
double stan::prob::hypergeometric_log ( const T_n &  n,
const T_N &  N,
const T_a &  a,
const T_b &  b 
)
inline

Definition at line 117 of file hypergeometric.hpp.

◆ hypergeometric_log() [3/4]

template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b , class Policy >
double stan::prob::hypergeometric_log ( const T_n &  n,
const T_N &  N,
const T_a &  a,
const T_b &  b,
const Policy &   
)

Definition at line 25 of file hypergeometric.hpp.

◆ hypergeometric_log() [4/4]

template<typename T_n , typename T_N , typename T_a , typename T_b , class Policy >
double stan::prob::hypergeometric_log ( const T_n &  n,
const T_N &  N,
const T_a &  a,
const T_b &  b,
const Policy &   
)
inline

Definition at line 103 of file hypergeometric.hpp.

◆ identity_constrain() [1/2]

template<typename T >
T stan::prob::identity_constrain ( const T  x,
T &  lp 
)
inline

Returns the result of applying the identity constraint transform to the input and increments the log probability reference with the log absolute Jacobian determinant.

This method is effectively a no-op and mainly useful as a placeholder in auto-generated code.

Parameters
xFree scalar.
lpReference to log probability.
Returns
Transformed input.
Template Parameters
TType of scalar.

Definition at line 387 of file transform.hpp.

◆ identity_constrain() [2/2]

template<typename T >
T stan::prob::identity_constrain ( x)
inline

Returns the result of applying the identity constraint transform to the input.

This method is effectively a no-op and is mainly useful as a placeholder in auto-generated code.

Parameters
xFree scalar.
Returns
Transformed input.
Template Parameters
TType of scalar.

Definition at line 368 of file transform.hpp.

◆ identity_free()

template<typename T >
T stan::prob::identity_free ( const T  y)
inline

Returns the result of applying the inverse of the identity constraint transform to the input.

This method is effectively a no-op and mainly useful as a placeholder in auto-generated code.

Parameters
yConstrained scalar.
Returns
The input.
Template Parameters
TType of scalar.

Definition at line 404 of file transform.hpp.

◆ inv_chi_square_log() [1/4]

template<bool propto, typename T_y , typename T_dof >
return_type<T_y,T_dof>::type stan::prob::inv_chi_square_log ( const T_y &  y,
const T_dof &  nu 
)
inline

Definition at line 94 of file inv_chi_square.hpp.

◆ inv_chi_square_log() [2/4]

template<typename T_y , typename T_dof >
return_type<T_y,T_dof>::type stan::prob::inv_chi_square_log ( const T_y &  y,
const T_dof &  nu 
)
inline

Definition at line 111 of file inv_chi_square.hpp.

◆ inv_chi_square_log() [3/4]

template<bool propto, typename T_y , typename T_dof , class Policy >
return_type<T_y,T_dof>::type stan::prob::inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const Policy &   
)

The log of an inverse chi-squared density for y with the specified degrees of freedom parameter.

The degrees of freedom prarameter must be greater than 0. y must be greater than 0.

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

Parameters
yA scalar variable.
nuDegrees of freedom.
Exceptions
std::domain_errorif nu is not greater than or equal to 0
std::domain_errorif y is not greater than or equal to 0.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.

Definition at line 38 of file inv_chi_square.hpp.

◆ inv_chi_square_log() [4/4]

template<typename T_y , typename T_dof , class Policy >
return_type<T_y,T_dof>::type stan::prob::inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const Policy &   
)
inline

Definition at line 102 of file inv_chi_square.hpp.

◆ inv_gamma_log() [1/4]

template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  beta 
)
inline

Definition at line 156 of file inv_gamma.hpp.

◆ inv_gamma_log() [2/4]

template<typename T_y , typename T_shape , typename T_scale >
return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  beta 
)
inline

Definition at line 172 of file inv_gamma.hpp.

◆ inv_gamma_log() [3/4]

template<bool propto, typename T_y , typename T_shape , typename T_scale , class Policy >
return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  beta,
const Policy &   
)

The log of an inverse gamma density for y with the specified shape and scale parameters.

Shape and scale parameters must be greater than 0. y must be greater than 0.

Parameters
yA scalar variable.
alphaShape parameter.
betaScale parameter.
Exceptions
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than 0.
Template Parameters
T_yType of scalar.
T_shapeType of shape.
T_scaleType of scale.

Definition at line 35 of file inv_gamma.hpp.

◆ inv_gamma_log() [4/4]

template<typename T_y , typename T_shape , typename T_scale , class Policy >
return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  beta,
const Policy &   
)
inline

Definition at line 164 of file inv_gamma.hpp.

◆ inv_wishart_log() [1/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::inv_wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S 
)
inline

Definition at line 113 of file inv_wishart.hpp.

◆ inv_wishart_log() [2/4]

template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::inv_wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S 
)
inline

Definition at line 135 of file inv_wishart.hpp.

◆ inv_wishart_log() [3/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::inv_wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S,
const Policy &   
)

The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix.

The scale matrix, S, must be k x k, symmetric, and semi-positive definite.

\begin{eqnarray*} W &\sim& \mbox{\sf{Inv-Wishart}}_{\nu} (S) \\ \log (p (W \,|\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{\nu/2} \left| W \right|^{-(\nu + k + 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S W^{-1})) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} +\frac{\nu}{2} \log(\det(S)) - \frac{\nu+k+1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr}(S W^{-1}) \end{eqnarray*}

Parameters
WA scalar matrix
nuDegrees of freedom
SThe scale matrix
Returns
The log of the Inverse-Wishart density at W given nu and S.
Exceptions
std::domain_errorif nu is not greater than k-1
std::domain_errorif S is not square, not symmetric, or not semi-positive definite.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.
T_scaleType of scale.

Definition at line 49 of file inv_wishart.hpp.

◆ inv_wishart_log() [4/4]

template<typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::inv_wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S,
const Policy &   
)
inline

Definition at line 124 of file inv_wishart.hpp.

◆ lb_constrain() [1/2]

template<typename T , typename TL >
T stan::prob::lb_constrain ( const T  x,
const TL  lb 
)
inline

Return the lower-bounded value for the specified unconstrained input and specified lower bound.

The transform applied is

$f(x) = \exp(x) + L$

where $L$ is the constant lower bound.

If the lower bound is negative infinity, this function reduces to identity_constrain(x).

Parameters
xUnconstrained scalar input.
lbLower-bound on constrained ouptut.
Returns
Lower-bound constrained value correspdonding to inputs.
Template Parameters
TType of scalar.
TLType of lower bound.

Definition at line 496 of file transform.hpp.

◆ lb_constrain() [2/2]

template<typename T , typename TL >
boost::math::tools::promote_args<T,TL>::type stan::prob::lb_constrain ( const T  x,
const TL  lb,
T &  lp 
)
inline

Return the lower-bounded value for the speicifed unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform.

If the lower bound is negative infinity, this function reduces to identity_constraint(x,lp).

Parameters
xUnconstrained scalar input.
lbLower-bound on output.
lpReference to log probability to increment.
Returns
Loer-bound constrained value corresponding to inputs.
Template Parameters
TType of scalar.
TLType of lower bound.

Definition at line 521 of file transform.hpp.

◆ lb_free()

template<typename T , typename TL >
boost::math::tools::promote_args<T,TL>::type stan::prob::lb_free ( const T  y,
const TL  lb 
)
inline

Return the unconstrained value that produces the specified lower-bound constrained value.

If the lower bound is negative infinity, it is ignored and the function reduces to identity_free(y).

Parameters
yInput scalar.
lbLower bound.
Returns
Unconstrained value that produces the input when constrained.
Template Parameters
TType of scalar.
TLType of lower bound.
Exceptions
std::domain_errorif y is lower than the lower bound.

Definition at line 546 of file transform.hpp.

◆ lkj_corr_cholesky_log() [1/4]

template<bool propto, typename T_covar , typename T_shape >
boost::math::tools::promote_args<T_covar, T_shape>::type stan::prob::lkj_corr_cholesky_log ( const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const T_shape &  eta 
)
inline

Definition at line 88 of file lkj_corr.hpp.

◆ lkj_corr_cholesky_log() [2/4]

template<typename T_covar , typename T_shape >
boost::math::tools::promote_args<T_covar, T_shape>::type stan::prob::lkj_corr_cholesky_log ( const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const T_shape &  eta 
)
inline

Definition at line 109 of file lkj_corr.hpp.

◆ lkj_corr_cholesky_log() [3/4]

template<bool propto, typename T_covar , typename T_shape , class Policy >
boost::math::tools::promote_args<T_covar, T_shape>::type stan::prob::lkj_corr_cholesky_log ( const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const T_shape &  eta,
const Policy &   
)

Definition at line 54 of file lkj_corr.hpp.

◆ lkj_corr_cholesky_log() [4/4]

template<typename T_covar , typename T_shape , class Policy >
boost::math::tools::promote_args<T_covar, T_shape>::type stan::prob::lkj_corr_cholesky_log ( const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const T_shape &  eta,
const Policy &   
)
inline

Definition at line 99 of file lkj_corr.hpp.

◆ lkj_corr_log() [1/4]

template<bool propto, typename T_y , typename T_shape >
boost::math::tools::promote_args<T_y, T_shape>::type stan::prob::lkj_corr_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_shape &  eta 
)
inline

Definition at line 165 of file lkj_corr.hpp.

◆ lkj_corr_log() [2/4]

template<typename T_y , typename T_shape >
boost::math::tools::promote_args<T_y, T_shape>::type stan::prob::lkj_corr_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_shape &  eta 
)
inline

Definition at line 185 of file lkj_corr.hpp.

◆ lkj_corr_log() [3/4]

template<bool propto, typename T_y , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y, T_shape>::type stan::prob::lkj_corr_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_shape &  eta,
const Policy &   
)

Definition at line 123 of file lkj_corr.hpp.

◆ lkj_corr_log() [4/4]

template<typename T_y , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y, T_shape>::type stan::prob::lkj_corr_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_shape &  eta,
const Policy &   
)
inline

Definition at line 175 of file lkj_corr.hpp.

◆ lkj_cov_log() [1/8]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &  sigma,
const T_shape &  eta 
)
inline

Definition at line 78 of file lkj_cov.hpp.

◆ lkj_cov_log() [2/8]

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &  sigma,
const T_shape &  eta 
)
inline

Definition at line 102 of file lkj_cov.hpp.

◆ lkj_cov_log() [3/8]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &  sigma,
const T_shape &  eta,
const Policy &   
)

Definition at line 25 of file lkj_cov.hpp.

◆ lkj_cov_log() [4/8]

template<typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &  sigma,
const T_shape &  eta,
const Policy &   
)
inline

Definition at line 90 of file lkj_cov.hpp.

◆ lkj_cov_log() [5/8]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_shape &  eta 
)
inline

Definition at line 159 of file lkj_cov.hpp.

◆ lkj_cov_log() [6/8]

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_shape &  eta 
)
inline

Definition at line 181 of file lkj_cov.hpp.

◆ lkj_cov_log() [7/8]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_shape &  eta,
const Policy &   
)

Definition at line 117 of file lkj_cov.hpp.

◆ lkj_cov_log() [8/8]

template<typename T_y , typename T_loc , typename T_scale , typename T_shape , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_shape>::type stan::prob::lkj_cov_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_shape &  eta,
const Policy &   
)
inline

Definition at line 170 of file lkj_cov.hpp.

◆ log_inv_logit_diff()

template<typename T >
T stan::prob::log_inv_logit_diff ( const T &  alpha,
const T &  beta 
)
inline

Definition at line 18 of file ordered_logistic.hpp.

◆ logistic_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::logistic_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 127 of file logistic.hpp.

◆ logistic_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::logistic_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 143 of file logistic.hpp.

◆ logistic_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::logistic_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Definition at line 20 of file logistic.hpp.

◆ logistic_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::logistic_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 135 of file logistic.hpp.

◆ lognormal_cdf() [1/2]

template<typename T_y , typename T_loc , typename T_scale >
boost::math::tools::promote_args<T_y,T_loc,T_scale>::type stan::prob::lognormal_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 194 of file lognormal.hpp.

◆ lognormal_cdf() [2/2]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale>::type stan::prob::lognormal_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Definition at line 167 of file lognormal.hpp.

◆ lognormal_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 141 of file lognormal.hpp.

◆ lognormal_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 157 of file lognormal.hpp.

◆ lognormal_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Definition at line 20 of file lognormal.hpp.

◆ lognormal_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 149 of file lognormal.hpp.

◆ lub_constrain() [1/2]

template<typename T , typename TL , typename TU >
boost::math::tools::promote_args<T,TL,TU>::type stan::prob::lub_constrain ( const T  x,
const TL  lb,
const TU  ub,
T &  lp 
)

Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds and increment the specified log probability with the log absolute Jacobian determinant.

The transform is as defined in lub_constrain(T,double,double). The log absolute Jacobian determinant is given by

$\log \left| \frac{d}{dx} \left( L + (U-L) \mbox{logit}^{-1}(x) \right) \right|$

$ {} = \log | (U-L) \, (\mbox{logit}^{-1}(x)) \, (1 - \mbox{logit}^{-1}(x)) |$

$ {} = \log (U - L) + \log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_constrain(x,ub,lp). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_constrain(x,lb,lp). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_constrain(x,lp).

Parameters
xFree scalar to transform.
lbLower bound.
ubUpper bound.
lpLog probability scalar reference.
Returns
Lower- and upper-bounded scalar derived from transforming the free scalar.
Template Parameters
TType of scalar.
TLType of lower bound.
TUType of upper bound.
Exceptions
std::domain_errorif ub <= lb

Definition at line 754 of file transform.hpp.

◆ lub_constrain() [2/2]

template<typename T , typename TL , typename TU >
boost::math::tools::promote_args<T,TL,TU>::type stan::prob::lub_constrain ( const T  x,
TL  lb,
TU  ub 
)
inline

Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds.

The transform is the transformed and scaled inverse logit,

$f(x) = L + (U - L) \mbox{logit}^{-1}(x)$

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_constrain(x,ub). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_constrain(x,lb). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_constrain(x).

Parameters
xFree scalar to transform.
lbLower bound.
ubUpper bound.
Returns
Lower- and upper-bounded scalar derived from transforming the free scalar.
Template Parameters
TType of scalar.
TLType of lower bound.
TUType of upper bound.
Exceptions
std::domain_errorif ub <= lb

Definition at line 684 of file transform.hpp.

◆ lub_free()

template<typename T , typename TL , typename TU >
boost::math::tools::promote_args<T,TL,TU>::type stan::prob::lub_free ( const T  y,
TL  lb,
TU  ub 
)
inline

Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar given the specified bounds.

The transfrom in lub_constrain(T,double,double), is reversed by a transformed and scaled logit,

$f^{-1}(y) = \mbox{logit}(\frac{y - L}{U - L})$

where $U$ and $L$ are the lower and upper bounds.

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_free(y,ub). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_free(x,lb). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_free(y).

Template Parameters
TType of scalar.
Parameters
yScalar input.
lbLower bound.
ubUpper bound.
Returns
The free scalar that transforms to the input scalar given the bounds.
Exceptions
std::invalid_argumentif the lower bound is greater than the upper bound, y is less than the lower bound, or y is greater than the upper bound

Definition at line 819 of file transform.hpp.

◆ make_nu()

template<typename T >
const Eigen::Array<T,Eigen::Dynamic,1> stan::prob::make_nu ( const T  eta,
const size_t  K 
)

This function calculates the degrees of freedom for the t distribution that corresponds to the shape parameter in the Lewandowski et.

al. distribution

Parameters
etahyperparameter on (0,inf), eta = 1 <-> correlation matrix is uniform
Knumber of variables in covariance matrix

Definition at line 323 of file transform.hpp.

◆ multi_normal_cholesky_log() [1/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L 
)
inline

Definition at line 99 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [2/8]

template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L 
)
inline

Definition at line 120 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [3/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const Policy &   
)

The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix.

Sigma = LL', a square, semi-positive definite matrix.

Parameters
yA scalar vector
muThe mean vector of the multivariate normal distribution.
LThe Cholesky decomposition of a variance matrix of the multivariate normal distribution
Returns
The log of the multivariate normal density.
Exceptions
std::domain_errorif LL' is not square, not symmetric, or not semi-positive definite.
Template Parameters
T_yType of scalar.
T_locType of location.
T_covarType of scale.

Definition at line 36 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [4/8]

template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const Policy &   
)
inline

Definition at line 110 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [5/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L 
)
inline

Definition at line 207 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [6/8]

template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L 
)
inline

Definition at line 228 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [7/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const Policy &   
)

y can have multiple rows (observations) and columns (on variables)

Definition at line 133 of file multi_normal.hpp.

◆ multi_normal_cholesky_log() [8/8]

template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_cholesky_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  L,
const Policy &   
)
inline

Definition at line 218 of file multi_normal.hpp.

◆ multi_normal_log() [1/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 291 of file multi_normal.hpp.

◆ multi_normal_log() [2/8]

template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 313 of file multi_normal.hpp.

◆ multi_normal_log() [3/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)

The log of the multivariate normal density for the given y, mu, and variance matrix.

The variance matrix, Sigma, must be size d x d, symmetric, and semi-positive definite. Dimension, d, is implicit.

Parameters
yA scalar vector
muThe mean vector of the multivariate normal distribution.
SigmaThe variance matrix of the multivariate normal distribution
Returns
The log of the multivariate normal density.
Exceptions
std::domain_errorif Sigma is not square, not symmetric, or not semi-positive definite.
Template Parameters
T_yType of scalar.
T_locType of location.
T_covarType of scale.

Definition at line 258 of file multi_normal.hpp.

◆ multi_normal_log() [4/8]

template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)
inline

Definition at line 302 of file multi_normal.hpp.

◆ multi_normal_log() [5/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 358 of file multi_normal.hpp.

◆ multi_normal_log() [6/8]

template<typename T_y , typename T_loc , typename T_covar >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 379 of file multi_normal.hpp.

◆ multi_normal_log() [7/8]

template<bool propto, typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)

y can have multiple rows (observations) and columns (on variables)

Definition at line 326 of file multi_normal.hpp.

◆ multi_normal_log() [8/8]

template<typename T_y , typename T_loc , typename T_covar , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_covar>::type stan::prob::multi_normal_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)
inline

Definition at line 369 of file multi_normal.hpp.

◆ multi_student_t_log() [1/4]

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_loc,T_scale>::type stan::prob::multi_student_t_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const T_dof &  nu,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 123 of file multi_student_t.hpp.

◆ multi_student_t_log() [2/4]

template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_loc,T_scale>::type stan::prob::multi_student_t_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const T_dof &  nu,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  Sigma 
)
inline

Definition at line 152 of file multi_student_t.hpp.

◆ multi_student_t_log() [3/4]

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_loc,T_scale>::type stan::prob::multi_student_t_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const T_dof &  nu,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)

Return the log of the multivariate Student t distribution at the specified arguments.

Template Parameters
proptoCarry out calculations up to a proportion

Definition at line 27 of file multi_student_t.hpp.

◆ multi_student_t_log() [4/4]

template<typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_loc,T_scale>::type stan::prob::multi_student_t_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &  y,
const T_dof &  nu,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &  mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  Sigma,
const Policy &   
)
inline

Definition at line 137 of file multi_student_t.hpp.

◆ multinomial_log() [1/4]

template<bool propto, typename T_prob >
boost::math::tools::promote_args<T_prob>::type stan::prob::multinomial_log ( const std::vector< int > &  ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta 
)

Definition at line 59 of file multinomial.hpp.

◆ multinomial_log() [2/4]

template<typename T_prob >
boost::math::tools::promote_args<T_prob>::type stan::prob::multinomial_log ( const std::vector< int > &  ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta 
)

Definition at line 76 of file multinomial.hpp.

◆ multinomial_log() [3/4]

template<bool propto, typename T_prob , class Policy >
boost::math::tools::promote_args<T_prob>::type stan::prob::multinomial_log ( const std::vector< int > &  ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Policy &   
)

Definition at line 21 of file multinomial.hpp.

◆ multinomial_log() [4/4]

template<typename T_prob , class Policy >
boost::math::tools::promote_args<T_prob>::type stan::prob::multinomial_log ( const std::vector< int > &  ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &  theta,
const Policy &   
)

Definition at line 67 of file multinomial.hpp.

◆ neg_binomial_log() [1/4]

template<bool propto, typename T_n , typename T_shape , typename T_inv_scale >
return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_log ( const T_n &  n,
const T_shape &  alpha,
const T_inv_scale &  beta 
)
inline

Definition at line 103 of file neg_binomial.hpp.

◆ neg_binomial_log() [2/4]

template<typename T_n , typename T_shape , typename T_inv_scale >
return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_log ( const T_n &  n,
const T_shape &  alpha,
const T_inv_scale &  beta 
)
inline

Definition at line 126 of file neg_binomial.hpp.

◆ neg_binomial_log() [3/4]

template<bool propto, typename T_n , typename T_shape , typename T_inv_scale , class Policy >
return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_log ( const T_n &  n,
const T_shape &  alpha,
const T_inv_scale &  beta,
const Policy &   
)

Definition at line 21 of file neg_binomial.hpp.

◆ neg_binomial_log() [4/4]

template<typename T_n , typename T_shape , typename T_inv_scale , class Policy >
return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_log ( const T_n &  n,
const T_shape &  alpha,
const T_inv_scale &  beta,
const Policy &   
)
inline

Definition at line 115 of file neg_binomial.hpp.

◆ normal_cdf() [1/2]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y, T_loc, T_scale>::type stan::prob::normal_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 224 of file normal.hpp.

◆ normal_cdf() [2/2]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::normal_cdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

Calculates the normal cumulative distribution function for the given variate, location, and scale.

$\Phi(x) = \frac{1}{\sqrt{2 \pi}} \int_{-\inf}^x e^{-t^2/2} dt$.

Errors are configured by policy. All variables must be finite and the scale must be strictly greater than zero.

Parameters
yA scalar variate.
muThe location of the normal distribution.
sigmaThe scale of the normal distriubtion
Returns
The unit normal cdf evaluated at the specified arguments.
Template Parameters
T_yType of y.
T_locType of mean parameter.
T_scaleType of standard deviation paramater.
PolicyError-handling policy.

Definition at line 178 of file normal.hpp.

◆ normal_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 136 of file normal.hpp.

◆ normal_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale >
return_type<T_y,T_loc,T_scale>::type stan::prob::normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 152 of file normal.hpp.

◆ normal_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s).

y, mu, or sigma can each be either a scalar or a std::vector. Any vector inputs must be the same length.

The result log probability is defined to be the sum of the log probabilities for each observation/mean/deviation triple.

Parameters
y(Sequence of) scalar(s).
mu(Sequence of) location parameter(s) for the normal distribution.
sigma(Sequence of) scale parameters for the normal distribution.
Returns
The log of the product of the densities.
Exceptions
std::domain_errorif the scale is not positive.
Template Parameters
T_yUnderlying type of scalar in sequence.
T_locType of location parameter.

Definition at line 40 of file normal.hpp.

◆ normal_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_loc,T_scale>::type stan::prob::normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 144 of file normal.hpp.

◆ normal_random()

template<typename T_loc , typename T_scale , class RNG >
double stan::prob::normal_random ( const T_loc &  mu,
const T_scale &  sigma,
RNG &  rng 
)
inline

Definition at line 231 of file normal.hpp.

◆ ordered_constrain() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::ordered_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x)

Return an increasing ordered vector derived from the specified free vector.

The returned constrained vector will have the same dimensionality as the specified free vector.

Parameters
xFree vector of scalars.
Returns
Positive, increasing ordered vector.
Template Parameters
TType of scalar.

Definition at line 1094 of file transform.hpp.

◆ ordered_constrain() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::ordered_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
T &  lp 
)
inline

Return a positive valued, increasing ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The returned constrained vector will have the same dimensionality as the specified free vector.

Parameters
xFree vector of scalars.
lpLog probability reference.
Returns
Positive, increasing ordered vector.
Template Parameters
TType of scalar.

Definition at line 1123 of file transform.hpp.

◆ ordered_free()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::ordered_free ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  y)

Return the vector of unconstrained scalars that transform to the specified positive ordered vector.

This function inverts the constraining operation defined in ordered_constrain(Matrix),

Parameters
yVector of positive, ordered scalars.
Returns
Free vector that transforms into the input vector.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif y is not a vector of positive, ordered scalars.

Definition at line 1147 of file transform.hpp.

◆ ordered_logistic_log() [1/4]

template<bool propto, typename T_lambda , typename T_cut >
boost::math::tools::promote_args<T_lambda,T_cut>::type stan::prob::ordered_logistic_log ( int  y,
const T_lambda &  lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &  c 
)

Definition at line 134 of file ordered_logistic.hpp.

◆ ordered_logistic_log() [2/4]

template<typename T_lambda , typename T_cut >
boost::math::tools::promote_args<T_lambda,T_cut>::type stan::prob::ordered_logistic_log ( int  y,
const T_lambda &  lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &  c 
)

Definition at line 156 of file ordered_logistic.hpp.

◆ ordered_logistic_log() [3/4]

template<bool propto, typename T_lambda , typename T_cut , class Policy >
boost::math::tools::promote_args<T_lambda,T_cut>::type stan::prob::ordered_logistic_log ( int  y,
const T_lambda &  lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &  c,
const Policy &   
)

Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model.


Typically the continous location will be the dot product of a vector of regression coefficients and a vector of predictors for the outcome.

Template Parameters
proptoTrue if calculating up to a proportion.
T_locLocation type.
T_cutCut-point type.
PolicyError policy (only its type matters).
Parameters
yOutcome.
lambdaLocation.
cPositive increasing vector of cutpoints.
Returns
Log probability of outcome given location and cutpoints.
Exceptions
std::domain_errorIf the outcome is not between 1 and the number of cutpoints plus 2; if the cutpoint vector is empty; if the cutpoint vector contains a non-positive, non-finite value; or if the cutpoint vector is not sorted in ascending order.

Definition at line 57 of file ordered_logistic.hpp.

◆ ordered_logistic_log() [4/4]

template<typename T_lambda , typename T_cut , class Policy >
boost::math::tools::promote_args<T_lambda,T_cut>::type stan::prob::ordered_logistic_log ( int  y,
const T_lambda &  lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &  c,
const Policy &   
)

Definition at line 145 of file ordered_logistic.hpp.

◆ pareto_log() [1/4]

template<bool propto, typename T_y , typename T_scale , typename T_shape >
return_type<T_y,T_scale,T_shape>::type stan::prob::pareto_log ( const T_y &  y,
const T_scale &  y_min,
const T_shape &  alpha 
)
inline

Definition at line 129 of file pareto.hpp.

◆ pareto_log() [2/4]

template<typename T_y , typename T_scale , typename T_shape >
return_type<T_y,T_scale,T_shape>::type stan::prob::pareto_log ( const T_y &  y,
const T_scale &  y_min,
const T_shape &  alpha 
)
inline

Definition at line 145 of file pareto.hpp.

◆ pareto_log() [3/4]

template<bool propto, typename T_y , typename T_scale , typename T_shape , class Policy >
return_type<T_y,T_scale,T_shape>::type stan::prob::pareto_log ( const T_y &  y,
const T_scale &  y_min,
const T_shape &  alpha,
const Policy &   
)

Definition at line 20 of file pareto.hpp.

◆ pareto_log() [4/4]

template<typename T_y , typename T_scale , typename T_shape , class Policy >
return_type<T_y,T_scale,T_shape>::type stan::prob::pareto_log ( const T_y &  y,
const T_scale &  y_min,
const T_shape &  alpha,
const Policy &   
)
inline

Definition at line 137 of file pareto.hpp.

◆ poisson_log() [1/4]

template<bool propto, typename T_n , typename T_rate >
return_type<T_rate>::type stan::prob::poisson_log ( const T_n &  n,
const T_rate &  lambda 
)
inline

Definition at line 100 of file poisson.hpp.

◆ poisson_log() [2/4]

template<typename T_n , typename T_rate >
return_type<T_rate>::type stan::prob::poisson_log ( const T_n &  n,
const T_rate &  lambda 
)
inline

Definition at line 120 of file poisson.hpp.

◆ poisson_log() [3/4]

template<bool propto, typename T_n , typename T_rate , class Policy >
return_type<T_rate>::type stan::prob::poisson_log ( const T_n &  n,
const T_rate &  lambda,
const Policy &   
)

Definition at line 22 of file poisson.hpp.

◆ poisson_log() [4/4]

template<typename T_n , typename T_rate , class Policy >
return_type<T_rate>::type stan::prob::poisson_log ( const T_n &  n,
const T_rate &  lambda,
const Policy &   
)
inline

Definition at line 110 of file poisson.hpp.

◆ poisson_log_log() [1/4]

template<bool propto, typename T_n , typename T_log_rate >
return_type<T_log_rate>::type stan::prob::poisson_log_log ( const T_n &  n,
const T_log_rate &  alpha 
)
inline

Definition at line 210 of file poisson.hpp.

◆ poisson_log_log() [2/4]

template<typename T_n , typename T_log_rate >
return_type<T_log_rate>::type stan::prob::poisson_log_log ( const T_n &  n,
const T_log_rate &  alpha 
)
inline

Definition at line 230 of file poisson.hpp.

◆ poisson_log_log() [3/4]

template<bool propto, typename T_n , typename T_log_rate , class Policy >
return_type<T_log_rate>::type stan::prob::poisson_log_log ( const T_n &  n,
const T_log_rate &  alpha,
const Policy &   
)

Definition at line 133 of file poisson.hpp.

◆ poisson_log_log() [4/4]

template<typename T_n , typename T_log_rate , class Policy >
return_type<T_log_rate>::type stan::prob::poisson_log_log ( const T_n &  n,
const T_log_rate &  alpha,
const Policy &   
)
inline

Definition at line 220 of file poisson.hpp.

◆ positive_constrain() [1/2]

template<typename T >
T stan::prob::positive_constrain ( const T  x)
inline

Return the positive value for the specified unconstrained input.

The transform applied is

$f(x) = \exp(x)$.

Parameters
xArbitrary input scalar.
Returns
Input transformed to be positive.

Definition at line 423 of file transform.hpp.

◆ positive_constrain() [2/2]

template<typename T >
T stan::prob::positive_constrain ( const T  x,
T &  lp 
)
inline

Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant.

See positive_constrain(T) for details of the transform. The log absolute Jacobian determinant is

$\log | \frac{d}{dx} \mbox{exp}(x) | = \log | \mbox{exp}(x) | = x$.

Parameters
xArbitrary input scalar.
lpLog probability reference.
Returns
Input transformed to be positive.
Template Parameters
TType of scalar.

Definition at line 445 of file transform.hpp.

◆ positive_free()

template<typename T >
T stan::prob::positive_free ( const T  y)
inline

Return the unconstrained value corresponding to the specified positive-constrained value.


The transform is the inverse of the transform $f$ applied by positive_constrain(T), namely

$f^{-1}(x) = \log(x)$.

The input is validated using stan::math::check_positive().

Parameters
yInput scalar.
Returns
Unconstrained value that produces the input when constrained.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif the variable is negative.

Definition at line 468 of file transform.hpp.

◆ positive_ordered_constrain() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::positive_ordered_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x)

Return an increasing positive ordered vector derived from the specified free vector.

The returned constrained vector will have the same dimensionality as the specified free vector.

Parameters
xFree vector of scalars.
Returns
Positive, increasing ordered vector.
Template Parameters
TType of scalar.

Definition at line 1175 of file transform.hpp.

◆ positive_ordered_constrain() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::positive_ordered_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x,
T &  lp 
)
inline

Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The returned constrained vector will have the same dimensionality as the specified free vector.

Parameters
xFree vector of scalars.
lpLog probability reference.
Returns
Positive, increasing ordered vector.
Template Parameters
TType of scalar.

Definition at line 1204 of file transform.hpp.

◆ positive_ordered_free()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::positive_ordered_free ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  y)

Return the vector of unconstrained scalars that transform to the specified positive ordered vector.

This function inverts the constraining operation defined in positive_ordered_constrain(Matrix),

Parameters
yVector of positive, ordered scalars.
Returns
Free vector that transforms into the input vector.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif y is not a vector of positive, ordered scalars.

Definition at line 1228 of file transform.hpp.

◆ prob_constrain() [1/2]

template<typename T >
T stan::prob::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)}$.

Parameters
xFree scalar.
Returns
Probability-constrained result of transforming the free scalar.
Template Parameters
TType of scalar.

Definition at line 848 of file transform.hpp.

◆ prob_constrain() [2/2]

template<typename T >
T stan::prob::prob_constrain ( const T  x,
T &  lp 
)
inline

Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The transform is as defined for prob_constrain(T). The log absolute Jacobian determinant is

The log absolute Jacobian determinant is

$\log | \frac{d}{dx} \mbox{logit}^{-1}(x) |$

$\log ((\mbox{logit}^{-1}(x)) (1 - \mbox{logit}^{-1}(x))$

$\log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$.

Parameters
xFree scalar.
lpLog probability reference.
Returns
Probability-constrained result of transforming the free scalar.
Template Parameters
TType of scalar.

Definition at line 876 of file transform.hpp.

◆ prob_free()

template<typename T >
T stan::prob::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}$.

Parameters
yScalar input.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif y is less than 0 or greater than 1.

Definition at line 900 of file transform.hpp.

◆ read_corr_L() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_corr_L ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const size_t  K 
)

Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations.

It is generally better to work with the Cholesky factor rather than the correlation matrix itself when the determinant, inverse, etc. of the correlation matrix is needed for some statistical calculation.

See read_corr_matrix(Array,size_t,T) for more information.

Parameters
CPCsThe (K choose 2) canonical partial correlations in (-1,1).
KDimensionality of correlation matrix.
Returns
Cholesky factor of correlation matrix for specified canonical partial correlations.
Template Parameters
TType of underlying scalar.

Definition at line 110 of file transform.hpp.

◆ read_corr_L() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_corr_L ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const size_t  K,
T &  log_prob 
)

Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation.

The implementation is Ben Goodrich's Cholesky factor-based approach to the C-vine method of:

  • Daniel Lewandowski, Dorota Kurowicka, and Harry Joe, Generating random correlation matrices based on vines and extended onion method Journal of Multivariate Analysis 100 (2009) 1989–2001

// FIXME: explain which CPCs we're dealing with

Parameters
CPCsThe (K choose 2) canonical partial correlations in (-1,1).
KDimensionality of correlation matrix.
log_probReference to variable to increment with the log Jacobian determinant.
Returns
Cholesky factor of correlation matrix for specified partial correlations.
Template Parameters
TType of underlying scalar.

Definition at line 188 of file transform.hpp.

◆ read_corr_matrix() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_corr_matrix ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const size_t  K 
)

Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations.

See read_corr_matrix(Array,size_t,T) for more information.

Parameters
CPCsThe (K choose 2) canonical partial correlations in (-1,1).
KDimensionality of correlation matrix.
Returns
Cholesky factor of correlation matrix for specified canonical partial correlations.
Template Parameters
TType of underlying scalar.

Definition at line 152 of file transform.hpp.

◆ read_corr_matrix() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_corr_matrix ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const size_t  K,
T &  log_prob 
)

Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation.

It is usually preferable to utilize the version that returns the Cholesky factor of the correlation matrix rather than the correlation matrix itself in statistical calculations.

Parameters
CPCsThe (K choose 2) canonical partial correlations in (-1,1).
KDimensionality of correlation matrix.
log_probReference to variable to increment with the log Jacobian determinant.
Returns
Correlation matrix for specified partial correlations.
Template Parameters
TType of underlying scalar.

Definition at line 238 of file transform.hpp.

◆ read_cov_L()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_cov_L ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > &  sds,
T &  log_prob 
)

This is the function that should be called prior to evaluating the density of any elliptical distribution.

Parameters
CPCson (-1,1)
sdson (0,inf)
log_probthe log probability value to increment with the Jacobian
Returns
Cholesky factor of covariance matrix for specified partial correlations.

Definition at line 260 of file transform.hpp.

◆ read_cov_matrix() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_cov_matrix ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > &  sds 
)

Builds a covariance matrix from CPCs and standard deviations.

Parameters
CPCsin (-1,1)
sdsin (0,inf)

Definition at line 299 of file transform.hpp.

◆ read_cov_matrix() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::read_cov_matrix ( const Eigen::Array< T, Eigen::Dynamic, 1 > &  CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > &  sds,
T &  log_prob 
)

A generally worse alternative to call prior to evaluating the density of an elliptical distribution.

Parameters
CPCson (-1,1)
sdson (0,inf)
log_probthe log probability value to increment with the Jacobian
Returns
Covariance matrix for specified partial correlations.

Definition at line 280 of file transform.hpp.

◆ scaled_inv_chi_square_log() [1/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale >
return_type<T_y,T_dof,T_scale>::type stan::prob::scaled_inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const T_scale &  s 
)
inline

Definition at line 108 of file scaled_inv_chi_square.hpp.

◆ scaled_inv_chi_square_log() [2/4]

template<typename T_y , typename T_dof , typename T_scale >
return_type<T_y,T_dof,T_scale>::type stan::prob::scaled_inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const T_scale &  s 
)
inline

Definition at line 125 of file scaled_inv_chi_square.hpp.

◆ scaled_inv_chi_square_log() [3/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
return_type<T_y,T_dof,T_scale>::type stan::prob::scaled_inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const T_scale &  s,
const Policy &   
)

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*}

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 38 of file scaled_inv_chi_square.hpp.

◆ scaled_inv_chi_square_log() [4/4]

template<typename T_y , typename T_dof , typename T_scale , class Policy >
return_type<T_y,T_dof,T_scale>::type stan::prob::scaled_inv_chi_square_log ( const T_y &  y,
const T_dof &  nu,
const T_scale &  s,
const Policy &   
)
inline

Definition at line 117 of file scaled_inv_chi_square.hpp.

◆ simplex_constrain() [1/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::simplex_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  y)

Return the simplex corresponding to the specified free vector.


A simplex is a vector containing values greater than or equal to 0 that sum to 1. A vector with (K-1) unconstrained values will produce a simplex of size K.

The transform is based on a centered stick-breaking process.

Parameters
yFree vector input of dimensionality K - 1.
Returns
Simplex of dimensionality K.
Template Parameters
TType of scalar.

Definition at line 991 of file transform.hpp.

◆ simplex_constrain() [2/2]

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::simplex_constrain ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  y,
T &  lp 
)

Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The simplex transform is defined through a centered stick-breaking process.

Parameters
yFree vector input of dimensionality K - 1.
lpLog probability reference to increment.
Returns
Simplex of dimensionality K.
Template Parameters
TType of scalar.

Definition at line 1024 of file transform.hpp.

◆ simplex_free()

template<typename T >
Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::simplex_free ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  x)

Return an unconstrained vector that when transformed produces the specified simplex.

It applies to a simplex of dimensionality K and produces an unconstrained vector of dimensionality (K-1).

The simplex transform is defined through a centered stick-breaking process.

Parameters
xSimplex of dimensionality K.
Returns
Free vector of dimensionality (K-1) that transfroms to the simplex.
Template Parameters
TType of scalar.
Exceptions
std::domain_errorif x is not a valid simplex

Definition at line 1064 of file transform.hpp.

◆ student_t_log() [1/4]

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type<T_y,T_dof,T_loc,T_scale>::type stan::prob::student_t_log ( const T_y &  y,
const T_dof &  nu,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 122 of file student_t.hpp.

◆ student_t_log() [2/4]

template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type<T_y,T_dof,T_loc,T_scale>::type stan::prob::student_t_log ( const T_y &  y,
const T_dof &  nu,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

Definition at line 140 of file student_t.hpp.

◆ student_t_log() [3/4]

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_dof,T_loc,T_scale>::type stan::prob::student_t_log ( const T_y &  y,
const T_dof &  nu,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)

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*}

Parameters
yA scalar variable.
nuDegrees of freedom.
muThe mean of the Student-t distribution.
sigmaThe scale parameter of the Student-t distribution.
Returns
The log of the Student-t density at y.
Exceptions
std::domain_errorif sigma is not greater than 0.
std::domain_errorif nu is not greater than 0.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.
T_locType of location.
T_scaleType of scale.

Definition at line 44 of file student_t.hpp.

◆ student_t_log() [4/4]

template<typename T_y , typename T_dof , typename T_loc , typename T_scale , class Policy >
return_type<T_y,T_dof,T_loc,T_scale>::type stan::prob::student_t_log ( const T_y &  y,
const T_dof &  nu,
const T_loc &  mu,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 131 of file student_t.hpp.

◆ trunc_normal_log() [1/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_alpha,T_beta>::type stan::prob::trunc_normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_alpha &  alpha,
const T_beta &  beta 
)
inline

Definition at line 90 of file trunc_normal.hpp.

◆ trunc_normal_log() [2/4]

template<typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_alpha,T_beta>::type stan::prob::trunc_normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_alpha &  alpha,
const T_beta &  beta 
)
inline

Definition at line 106 of file trunc_normal.hpp.

◆ trunc_normal_log() [3/4]

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_alpha,T_beta>::type stan::prob::trunc_normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_alpha &  alpha,
const T_beta &  beta,
const Policy &   
)

The log of the truncated normal density for the given y, mean, and standard deviation.

The standard deviation must be greater than 0.

\begin{eqnarray*} y &\sim& \mbox{\sf{N}} (\mu, \sigma^2) \\ \log (p (y \,|\, \mu, \sigma) ) &=& \log \left( \frac{1}{\sqrt{2 \pi} \sigma} \exp \left( - \frac{1}{2 \sigma^2} (y - \mu)^2 \right) \right) \\ &=& \log (1) - \frac{1}{2}\log (2 \pi) - \log (\sigma) - \frac{(y - \mu)^2}{2 \sigma^2} - log(\Phi(\frac{\beta - \mu}{\sigma}) - \Phi(\frac{\alpha - \mu}{\sigma})) \end{eqnarray*}

Errors are configured by policy. All variables except alpha and beta must be finite, the scale must be strictly greater than zero and alpha < beta

Parameters
yA scalar variate.
muThe location of the normal distribution.
sigmaThe scale of the normal distribution.
alphaThe lowerbound of the normal distribution.
betaThe upperbound of the normal distribution.
Returns
The log of the normal density of the specified arguments.
Template Parameters
proptoSet to true if only calculated up to a proportion.
T_yType of scalar.
T_locType of location.
T_scaleType of scale.
T_alphaType of lowerbound.
T_betaType of upperbound.
PolicyError-handling policy.

Definition at line 45 of file trunc_normal.hpp.

◆ trunc_normal_log() [4/4]

template<typename T_y , typename T_loc , typename T_scale , typename T_alpha , typename T_beta , class Policy >
boost::math::tools::promote_args<T_y,T_loc,T_scale,T_alpha,T_beta>::type stan::prob::trunc_normal_log ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma,
const T_alpha &  alpha,
const T_beta &  beta,
const Policy &   
)
inline

Definition at line 98 of file trunc_normal.hpp.

◆ ub_constrain() [1/2]

template<typename T , typename TU >
boost::math::tools::promote_args<T,TU>::type stan::prob::ub_constrain ( const T  x,
const TU  ub 
)
inline

Return the upper-bounded value for the specified unconstrained scalar and upper bound.

The transform is

$f(x) = U - \exp(x)$

where $U$ is the upper bound.

If the upper bound is positive infinity, this function reduces to identity_constrain(x).

Parameters
xFree scalar.
ubUpper bound.
Returns
Transformed scalar with specified upper bound.
Template Parameters
TType of scalar.
TUType of upper bound.

Definition at line 579 of file transform.hpp.

◆ ub_constrain() [2/2]

template<typename T , typename TU >
boost::math::tools::promote_args<T,TU>::type stan::prob::ub_constrain ( const T  x,
const TU  ub,
T &  lp 
)
inline

Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The transform is as specified for ub_constrain(T,double). The log absolute Jacobian determinant is

$ \log | \frac{d}{dx} -\mbox{exp}(x) + U | = \log | -\mbox{exp}(x) + 0 | = x$.

If the upper bound is positive infinity, this function reduces to identity_constrain(x,lp).

Parameters
xFree scalar.
ubUpper bound.
lpLog probability reference.
Returns
Transformed scalar with specified upper bound.
Template Parameters
TType of scalar.
TUType of upper bound.

Definition at line 611 of file transform.hpp.

◆ ub_free()

template<typename T , typename TU >
boost::math::tools::promote_args<T,TU>::type stan::prob::ub_free ( const T  y,
const TU  ub 
)
inline

Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound.

The transform is the reverse of the ub_constrain(T,double) transform,

$f^{-1}(y) = \log -(y - U)$

where $U$ is the upper bound.

If the upper bound is positive infinity, this function reduces to identity_free(y).

Parameters
yUpper-bounded scalar.
ubUpper bound.
Returns
Free scalar corresponding to upper-bounded scalar.
Template Parameters
TType of scalar.
TUType of upper bound.
Exceptions
std::invalid_argumentif y is greater than the upper bound.

Definition at line 643 of file transform.hpp.

◆ uniform_log() [1/4]

template<bool propto, typename T_y , typename T_low , typename T_high >
return_type<T_y,T_low,T_high>::type stan::prob::uniform_log ( const T_y &  y,
const T_low &  alpha,
const T_high &  beta 
)
inline

Definition at line 102 of file uniform.hpp.

◆ uniform_log() [2/4]

template<typename T_y , typename T_low , typename T_high >
return_type<T_y,T_low,T_high>::type stan::prob::uniform_log ( const T_y &  y,
const T_low &  alpha,
const T_high &  beta 
)
inline

Definition at line 119 of file uniform.hpp.

◆ uniform_log() [3/4]

template<bool propto, typename T_y , typename T_low , typename T_high , class Policy >
return_type<T_y,T_low,T_high>::type stan::prob::uniform_log ( const T_y &  y,
const T_low &  alpha,
const T_high &  beta,
const Policy &   
)

The log of a uniform density for the given y, lower, and upper bound.

\begin{eqnarray*} y &\sim& \mbox{\sf{U}}(\alpha, \beta) \\ \log (p (y \,|\, \alpha, \beta)) &=& \log \left( \frac{1}{\beta-\alpha} \right) \\ &=& \log (1) - \log (\beta - \alpha) \\ &=& -\log (\beta - \alpha) \\ & & \mathrm{ where } \; y \in [\alpha, \beta], \log(0) \; \mathrm{otherwise} \end{eqnarray*}

Parameters
yA scalar variable.
alphaLower bound.
betaUpper bound.
Exceptions
std::invalid_argumentif the lower bound is greater than or equal to the lower bound
Template Parameters
T_yType of scalar.
T_lowType of lower bound.
T_highType of upper bound.

Definition at line 41 of file uniform.hpp.

◆ uniform_log() [4/4]

template<typename T_y , typename T_low , typename T_high , class Policy >
return_type<T_y,T_low,T_high>::type stan::prob::uniform_log ( const T_y &  y,
const T_low &  alpha,
const T_high &  beta,
const Policy &   
)
inline

Definition at line 110 of file uniform.hpp.

◆ weibull_cdf() [1/2]

template<typename T_y , typename T_shape , typename T_scale >
boost::math::tools::promote_args<T_y,T_shape,T_scale>::type stan::prob::weibull_cdf ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma 
)
inline

Definition at line 153 of file weibull.hpp.

◆ weibull_cdf() [2/2]

template<typename T_y , typename T_shape , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_shape,T_scale>::type stan::prob::weibull_cdf ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma,
const Policy &   
)

Definition at line 122 of file weibull.hpp.

◆ weibull_log() [1/4]

template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma 
)
inline

Definition at line 94 of file weibull.hpp.

◆ weibull_log() [2/4]

template<typename T_y , typename T_shape , typename T_scale >
return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma 
)
inline

Definition at line 112 of file weibull.hpp.

◆ weibull_log() [3/4]

template<bool propto, typename T_y , typename T_shape , typename T_scale , class Policy >
return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma,
const Policy &   
)

Definition at line 21 of file weibull.hpp.

◆ weibull_log() [4/4]

template<typename T_y , typename T_shape , typename T_scale , class Policy >
return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_log ( const T_y &  y,
const T_shape &  alpha,
const T_scale &  sigma,
const Policy &   
)
inline

Definition at line 103 of file weibull.hpp.

◆ wishart_log() [1/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S 
)
inline

Definition at line 124 of file wishart.hpp.

◆ wishart_log() [2/4]

template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S 
)
inline

Definition at line 146 of file wishart.hpp.

◆ wishart_log() [3/4]

template<bool propto, typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S,
const Policy &   
)

The log of the Wishart density for the given W, degrees of freedom, and scale matrix.

The scale matrix, S, must be k x k, symmetric, and semi-positive definite. Dimension, k, is implicit. nu must be greater than k-1

\begin{eqnarray*} W &\sim& \mbox{\sf{Wishart}}_{\nu} (S) \\ \log (p (W \,|\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{-\nu/2} \left| W \right|^{(\nu - k - 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S^{-1} W)) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} -\frac{\nu}{2} \log(\det(S)) + \frac{\nu-k-1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr} (S^{-1}W) \end{eqnarray*}

Parameters
WA scalar matrix
nuDegrees of freedom
SThe scale matrix
Returns
The log of the Wishart density at W given nu and S.
Exceptions
std::domain_errorif nu is not greater than k-1
std::domain_errorif S is not square, not symmetric, or not semi-positive definite.
Template Parameters
T_yType of scalar.
T_dofType of degrees of freedom.
T_scaleType of scale.

Definition at line 50 of file wishart.hpp.

◆ wishart_log() [4/4]

template<typename T_y , typename T_dof , typename T_scale , class Policy >
boost::math::tools::promote_args<T_y,T_dof,T_scale>::type stan::prob::wishart_log ( const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &  W,
const T_dof &  nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &  S,
const Policy &   
)
inline

Definition at line 135 of file wishart.hpp.

Variable Documentation

◆ CONSTRAINT_TOLERANCE

const double stan::prob::CONSTRAINT_TOLERANCE = 1E-8

Definition at line 25 of file transform.hpp.


     [ Stan Home Page ] © 2011–2012, Stan Development Team.