![]() |
Stan
2.5.0
probability, sampling & optimization
|
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... | |
| class | welford_covar_estimator |
| class | welford_var_estimator |
Functions | |
| template<bool propto, typename T_y , typename T_loc , typename T_scale > | |
| boost::enable_if_c < contains_fvar< T_y, T_loc, T_scale >::value, typename return_type< T_y, T_loc, T_scale >::type >::type | normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| 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 > | |
| 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) |
| The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha. More... | |
| 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<class RNG > | |
| Eigen::VectorXd | dirichlet_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, RNG &rng) |
| template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 > | |
| return_type< T_y, typename return_type< T_F, T_G, T_V, T_W, T_m0, T_C0 >::type > ::type | gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0) |
| The log of a Gaussian dynamic linear model (GDLM). More... | |
| template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 > | |
| return_type< T_y, typename return_type< T_F, T_G, T_V, T_W, T_m0, T_C0 >::type > ::type | gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0) |
| template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 > | |
| return_type< T_y, typename return_type< T_F, T_G, T_V, T_W, T_m0, T_C0 >::type > ::type | gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0) |
| The log of a Gaussian dynamic linear model (GDLM) with uncorrelated observation disturbances. More... | |
| template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 > | |
| return_type< T_y, typename return_type< T_F, T_G, T_V, T_W, T_m0, T_C0 >::type > ::type | gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0) |
| 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) |
| The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix. More... | |
| 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<class RNG > | |
| Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | inv_wishart_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng) |
| 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 > | |
| 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 > | |
| 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 > | |
| 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 > | |
| 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<class RNG > | |
| Eigen::MatrixXd | lkj_corr_cholesky_rng (const size_t K, const double eta, RNG &rng) |
| template<class RNG > | |
| Eigen::MatrixXd | lkj_corr_rng (const size_t K, const double eta, RNG &rng) |
| 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 > | |
| 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 > | |
| 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 > | |
| 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_Mu , typename T_Sigma , typename T_D > | |
| boost::math::tools::promote_args < T_y, T_Mu, T_Sigma, T_D > ::type | matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D) |
| The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices. More... | |
| template<typename T_y , typename T_Mu , typename T_Sigma , typename T_D > | |
| boost::math::tools::promote_args < T_y, T_Mu, T_Sigma, T_D > ::type | matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D) |
| template<bool propto, typename T_y , typename T_covar , typename T_w > | |
| boost::math::tools::promote_args < T_y, T_covar, T_w >::type | multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w) |
| The log of a multivariate Gaussian Process for the given y, Sigma, and w. More... | |
| template<typename T_y , typename T_covar , typename T_w > | |
| boost::math::tools::promote_args < T_y, T_covar, T_w >::type | multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w) |
| template<bool propto, typename T_y , typename T_covar , typename T_w > | |
| boost::math::tools::promote_args < T_y, T_covar, T_w >::type | multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w) |
| The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel matrix Sigma. More... | |
| template<typename T_y , typename T_covar , typename T_w > | |
| boost::math::tools::promote_args < T_y, T_covar, T_w >::type | multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w) |
| template<bool propto, typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_log (const T_y &y, const T_loc &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma) |
| template<typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_log (const T_y &y, const T_loc &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma) |
| template<class RNG > | |
| Eigen::VectorXd | multi_normal_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L) |
| The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix. More... | |
| template<typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L) |
| template<class RNG > | |
| Eigen::VectorXd | multi_normal_cholesky_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_prec_log (const T_y &y, const T_loc &mu, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma) |
| template<typename T_y , typename T_loc , typename T_covar > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, typename scalar_type < T_loc >::type, T_covar > ::type | multi_normal_prec_log (const T_y &y, const T_loc &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 > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, T_dof, typename scalar_type< T_loc >::type, T_scale >::type | multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma) |
| Return the log of the multivariate Student t distribution at the specified arguments. More... | |
| template<typename T_y , typename T_dof , typename T_loc , typename T_scale > | |
| boost::math::tools::promote_args < typename scalar_type< T_y > ::type, T_dof, typename scalar_type< T_loc >::type, T_scale >::type | multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &Sigma) |
| template<class RNG > | |
| Eigen::VectorXd | multi_student_t_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &s, RNG &rng) |
| 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) |
| The log of the Wishart density for the given W, degrees of freedom, and scale matrix. More... | |
| 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<class RNG > | |
| Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | wishart_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng) |
| template<bool propto, typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta) |
| template<typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_log (const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta) |
| template<bool propto, typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta) |
| template<typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta) |
| template<class RNG > | |
| int | categorical_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, RNG &rng) |
| template<bool propto, typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta) |
| template<typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta) |
| template<bool propto, typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta) |
| template<typename T_prob > | |
| boost::math::tools::promote_args < T_prob >::type | categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta) |
| 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 > | |
| 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<class RNG > | |
| std::vector< int > | multinomial_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, const int N, RNG &rng) |
| 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) |
| The log of the beta density for the specified scalar(s) given the specified sample size(s). 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_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 > | |
| 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) |
| 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_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 > | |
| return_type< T_y, T_scale_succ, T_scale_fail >::type | beta_ccdf_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta) |
| template<class RNG > | |
| double | beta_rng (const double alpha, const double beta, RNG &rng) |
| 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) |
| The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s). More... | |
| 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 > | |
| return_type< T_y, T_loc, T_scale >::type | cauchy_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| 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_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | cauchy_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | cauchy_rng (const double mu, const double sigma, RNG &rng) |
| 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) |
| The log of a chi-squared density for y with the specified degrees of freedom parameter. More... | |
| 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<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | chi_square_cdf (const T_y &y, const T_dof &nu) |
| Calculates the chi square cumulative distribution function for the given variate and degrees of freedom. More... | |
| template<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | chi_square_cdf_log (const T_y &y, const T_dof &nu) |
| template<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | chi_square_ccdf_log (const T_y &y, const T_dof &nu) |
| template<class RNG > | |
| double | chi_square_rng (const double nu, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_y, T_loc, T_scale >::type | double_exponential_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| Calculates the double exponential cumulative density function. More... | |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | double_exponential_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | double_exponential_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | double_exponential_rng (const double mu, const double sigma, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_inv_scale > | |
| return_type< T_y, T_loc, T_scale, T_inv_scale >::type | exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale > | |
| return_type< T_y, T_loc, T_scale, T_inv_scale >::type | exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale > | |
| return_type< T_y, T_loc, T_scale, T_inv_scale >::type | exp_mod_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale > | |
| return_type< T_y, T_loc, T_scale, T_inv_scale >::type | exp_mod_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale > | |
| return_type< T_y, T_loc, T_scale, T_inv_scale >::type | exp_mod_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda) |
| template<class RNG > | |
| double | exp_mod_normal_rng (const double mu, const double sigma, const double lambda, RNG &rng) |
| 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) |
| The log of an exponential density for y with the specified inverse scale parameter. More... | |
| 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 > | |
| return_type< T_y, T_inv_scale > ::type | exponential_cdf (const T_y &y, const T_inv_scale &beta) |
| Calculates the exponential cumulative distribution function for the given y and beta. More... | |
| template<typename T_y , typename T_inv_scale > | |
| return_type< T_y, T_inv_scale > ::type | exponential_cdf_log (const T_y &y, const T_inv_scale &beta) |
| template<typename T_y , typename T_inv_scale > | |
| return_type< T_y, T_inv_scale > ::type | exponential_ccdf_log (const T_y &y, const T_inv_scale &beta) |
| template<class RNG > | |
| double | exponential_rng (const double beta, RNG &rng) |
| template<bool propto, typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | frechet_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | frechet_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | frechet_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<class RNG > | |
| double | frechet_rng (const double alpha, const double sigma, RNG &rng) |
| 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) |
| The log of a gamma density for y with the specified shape and inverse scale parameters. More... | |
| 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<typename T_y , typename T_shape , typename T_inv_scale > | |
| return_type< T_y, T_shape, T_inv_scale >::type | gamma_cdf (const T_y &y, const T_shape &alpha, const T_inv_scale &beta) |
| The cumulative density function for a gamma distribution for y with the specified shape and inverse scale parameters. More... | |
| template<typename T_y , typename T_shape , typename T_inv_scale > | |
| return_type< T_y, T_shape, T_inv_scale >::type | gamma_cdf_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 > | |
| return_type< T_y, T_shape, T_inv_scale >::type | gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta) |
| template<class RNG > | |
| double | gamma_rng (const double alpha, const double beta, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | gumbel_cdf (const T_y &y, const T_loc &mu, const T_scale &beta) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | gumbel_cdf_log (const T_y &y, const T_loc &mu, const T_scale &beta) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | gumbel_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &beta) |
| template<class RNG > | |
| double | gumbel_rng (const double mu, const double beta, RNG &rng) |
| 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) |
| The log of an inverse chi-squared density for y with the specified degrees of freedom parameter. More... | |
| 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<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | inv_chi_square_cdf (const T_y &y, const T_dof &nu) |
| template<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | inv_chi_square_cdf_log (const T_y &y, const T_dof &nu) |
| template<typename T_y , typename T_dof > | |
| return_type< T_y, T_dof >::type | inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu) |
| template<class RNG > | |
| double | inv_chi_square_rng (const double nu, RNG &rng) |
| 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) |
| The log of an inverse gamma density for y with the specified shape and scale parameters. More... | |
| 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<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | inv_gamma_cdf (const T_y &y, const T_shape &alpha, const T_scale &beta) |
| The CDF of an inverse gamma density for y with the specified shape and scale parameters. More... | |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | inv_gamma_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | inv_gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta) |
| template<class RNG > | |
| double | inv_gamma_rng (const double alpha, const double beta, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_y, T_loc, T_scale >::type | logistic_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | logistic_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | logistic_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | logistic_rng (const double mu, const double sigma, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_y, T_loc, T_scale >::type | lognormal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | lognormal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | lognormal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | lognormal_rng (const double mu, const double sigma, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale > | |
| boost::enable_if_c < is_var_or_arithmetic< T_y, T_loc, T_scale >::value, typename return_type< T_y, T_loc, T_scale >::type >::type | normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s). More... | |
| 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 > | |
| return_type< T_y, T_loc, T_scale >::type | normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| 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_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | normal_rng (const double mu, const double sigma, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_y, T_scale, T_shape >::type | pareto_cdf (const T_y &y, const T_scale &y_min, const T_shape &alpha) |
| template<typename T_y , typename T_scale , typename T_shape > | |
| return_type< T_y, T_scale, T_shape >::type | pareto_cdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha) |
| template<typename T_y , typename T_scale , typename T_shape > | |
| return_type< T_y, T_scale, T_shape >::type | pareto_ccdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha) |
| template<class RNG > | |
| double | pareto_rng (const double y_min, const double alpha, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | pareto_type_2_cdf (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | pareto_type_2_cdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | pareto_type_2_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha) |
| template<class RNG > | |
| double | pareto_type_2_rng (const double mu, const double lambda, const double alpha, RNG &rng) |
| template<bool propto, typename T_y , typename T_scale > | |
| return_type< T_y, T_scale >::type | rayleigh_log (const T_y &y, const T_scale &sigma) |
| template<typename T_y , typename T_scale > | |
| return_type< T_y, T_scale >::type | rayleigh_log (const T_y &y, const T_scale &sigma) |
| template<typename T_y , typename T_scale > | |
| return_type< T_y, T_scale >::type | rayleigh_cdf (const T_y &y, const T_scale &sigma) |
| template<typename T_y , typename T_scale > | |
| return_type< T_y, T_scale >::type | rayleigh_cdf_log (const T_y &y, const T_scale &sigma) |
| template<typename T_y , typename T_scale > | |
| return_type< T_y, T_scale >::type | rayleigh_ccdf_log (const T_y &y, const T_scale &sigma) |
| template<class RNG > | |
| double | rayleigh_rng (const double sigma, RNG &rng) |
| 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) |
| The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More... | |
| 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<typename T_y , typename T_dof , typename T_scale > | |
| return_type< T_y, T_dof, T_scale >::type | scaled_inv_chi_square_cdf (const T_y &y, const T_dof &nu, const T_scale &s) |
| The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More... | |
| template<typename T_y , typename T_dof , typename T_scale > | |
| return_type< T_y, T_dof, T_scale >::type | scaled_inv_chi_square_cdf_log (const T_y &y, const T_dof &nu, const T_scale &s) |
| template<typename T_y , typename T_dof , typename T_scale > | |
| return_type< T_y, T_dof, T_scale >::type | scaled_inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu, const T_scale &s) |
| template<class RNG > | |
| double | scaled_inv_chi_square_rng (const double nu, const double s, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | skew_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | skew_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha) |
| template<typename T_y , typename T_loc , typename T_scale , typename T_shape > | |
| return_type< T_y, T_loc, T_scale, T_shape >::type | skew_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha) |
| template<class RNG > | |
| double | skew_normal_rng (const double mu, const double sigma, const double alpha, RNG &rng) |
| 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) |
| The log of the Student-t density for the given y, nu, mean, and scale parameter. More... | |
| 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<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_cdf (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 > | |
| return_type< T_y, T_dof, T_loc, T_scale >::type | student_t_cdf_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 > | |
| return_type< T_y, T_dof, T_loc, T_scale >::type | student_t_ccdf_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma) |
| template<class RNG > | |
| double | student_t_rng (const double nu, const double mu, const double sigma, RNG &rng) |
| 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) |
| The log of a uniform density for the given y, lower, and upper bound. More... | |
| 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<typename T_y , typename T_low , typename T_high > | |
| return_type< T_y, T_low, T_high >::type | uniform_cdf (const T_y &y, const T_low &alpha, const T_high &beta) |
| template<typename T_y , typename T_low , typename T_high > | |
| return_type< T_y, T_low, T_high >::type | uniform_cdf_log (const T_y &y, const T_low &alpha, const T_high &beta) |
| template<typename T_y , typename T_low , typename T_high > | |
| return_type< T_y, T_low, T_high >::type | uniform_ccdf_log (const T_y &y, const T_low &alpha, const T_high &beta) |
| template<class RNG > | |
| double | uniform_rng (const double alpha, const double beta, RNG &rng) |
| template<bool propto, typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa) |
| template<typename T_y , typename T_loc , typename T_scale > | |
| return_type< T_y, T_loc, T_scale >::type | von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa) |
| template<class RNG > | |
| double | von_mises_rng (const double mu, const double kappa, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_y, T_shape, T_scale >::type | weibull_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | weibull_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<typename T_y , typename T_shape , typename T_scale > | |
| return_type< T_y, T_shape, T_scale >::type | weibull_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma) |
| template<class RNG > | |
| double | weibull_rng (const double alpha, const double sigma, RNG &rng) |
| template<bool propto, typename T_n , typename T_prob > | |
| return_type< T_prob >::type | bernoulli_log (const T_n &n, const T_prob &theta) |
| 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 > | |
| return_type< T_prob >::type | bernoulli_logit_log (const T_n &n, const T_prob &theta) |
| template<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 > | |
| return_type< T_prob >::type | bernoulli_cdf (const T_n &n, const T_prob &theta) |
| template<typename T_n , typename T_prob > | |
| return_type< T_prob >::type | bernoulli_cdf_log (const T_n &n, const T_prob &theta) |
| template<typename T_n , typename T_prob > | |
| return_type< T_prob >::type | bernoulli_ccdf_log (const T_n &n, const T_prob &theta) |
| template<class RNG > | |
| int | bernoulli_rng (const double theta, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_size1, T_size2 > ::type | beta_binomial_cdf (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 > | |
| return_type< T_size1, T_size2 > ::type | beta_binomial_cdf_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 > | |
| return_type< T_size1, T_size2 > ::type | beta_binomial_ccdf_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta) |
| template<class RNG > | |
| int | beta_binomial_rng (const int N, const double alpha, const double beta, RNG &rng) |
| 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 > | |
| 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_prob > | |
| return_type< T_prob >::type | binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha) |
| template<typename T_n , typename T_N , typename T_prob > | |
| return_type< T_prob >::type | binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha) |
| template<typename T_n , typename T_N , typename T_prob > | |
| return_type< T_prob >::type | binomial_cdf (const T_n &n, const T_N &N, const T_prob &theta) |
| template<typename T_n , typename T_N , typename T_prob > | |
| return_type< T_prob >::type | binomial_cdf_log (const T_n &n, const T_N &N, const T_prob &theta) |
| template<typename T_n , typename T_N , typename T_prob > | |
| return_type< T_prob >::type | binomial_ccdf_log (const T_n &n, const T_N &N, const T_prob &theta) |
| template<class RNG > | |
| int | binomial_rng (const int N, const double theta, RNG &rng) |
| 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 > | |
| double | hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b) |
| template<class RNG > | |
| int | hypergeometric_rng (const int N, const int a, const int b, RNG &rng) |
| 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 > | |
| 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 > | |
| return_type< T_shape, T_inv_scale >::type | neg_binomial_cdf (const T_n &n, const T_shape &alpha, const T_inv_scale &beta) |
| template<typename T_n , typename T_shape , typename T_inv_scale > | |
| return_type< T_shape, T_inv_scale >::type | neg_binomial_cdf_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 > | |
| return_type< T_shape, T_inv_scale >::type | neg_binomial_ccdf_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta) |
| template<class RNG > | |
| int | neg_binomial_rng (const double alpha, const double beta, RNG &rng) |
| template<bool propto, typename T_n , typename T_location , typename T_inv_scale > | |
| return_type< T_location, T_inv_scale >::type | neg_binomial_2_log (const T_n &n, const T_location &mu, const T_inv_scale &phi) |
| template<typename T_n , typename T_location , typename T_inv_scale > | |
| return_type< T_location, T_inv_scale >::type | neg_binomial_2_log (const T_n &n, const T_location &mu, const T_inv_scale &phi) |
| template<bool propto, typename T_n , typename T_log_location , typename T_inv_scale > | |
| return_type< T_log_location, T_inv_scale >::type | neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_inv_scale &phi) |
| template<typename T_n , typename T_log_location , typename T_inv_scale > | |
| return_type< T_log_location, T_inv_scale >::type | neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_inv_scale &phi) |
| template<class RNG > | |
| int | neg_binomial_2_rng (const double mu, const double phi, RNG &rng) |
| template<class RNG > | |
| int | neg_binomial_2_log_rng (const double eta, const double phi, RNG &rng) |
| template<typename T > | |
| T | log_inv_logit_diff (const T &alpha, const T &beta) |
| 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) |
| Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model. More... | |
| 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<class RNG > | |
| int | ordered_logistic_rng (const double eta, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &c, RNG &rng) |
| 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 > | |
| 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 > | |
| 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 > | |
| return_type< T_log_rate >::type | poisson_log_log (const T_n &n, const T_log_rate &alpha) |
| template<typename T_n , typename T_rate > | |
| return_type< T_rate >::type | poisson_cdf (const T_n &n, const T_rate &lambda) |
| template<typename T_n , typename T_rate > | |
| return_type< T_rate >::type | poisson_cdf_log (const T_n &n, const T_rate &lambda) |
| template<typename T_n , typename T_rate > | |
| return_type< T_rate >::type | poisson_ccdf_log (const T_n &n, const T_rate &lambda) |
| template<class RNG > | |
| int | poisson_rng (const double lambda, RNG &rng) |
| template<typename T > | |
| void | factor_U (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &U, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs) |
| This function is intended to make starting values, given a unit upper-triangular matrix U such that U'DU is a correlation matrix. More... | |
| template<typename T > | |
| bool | factor_cov_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds) |
| 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 > | |
| T | identity_constrain (T x) |
| Returns the result of applying the identity constraint transform to the input. More... | |
| template<typename T > | |
| T | identity_constrain (const T x, T &) |
| 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 > | |
| 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 > | |
| T | positive_constrain (const T x) |
| Return the positive value for the specified unconstrained input. More... | |
| template<typename T > | |
| 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 > | |
| T | positive_free (const T y) |
| Return the unconstrained value corresponding to the specified positive-constrained value. More... | |
| template<typename T , typename TL > | |
| T | 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 > | |
| 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 > | |
| 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 > | |
| T | prob_free (const T y) |
| Return the free scalar that when transformed to a probability produces the specified scalar. More... | |
| template<typename T > | |
| 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 > | |
| 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 > | |
| 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 > | unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y) |
| Return the unit length vector corresponding to the free vector y. More... | |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp) |
| Return the unit length vector corresponding to the free vector y. More... | |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | unit_vector_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x) |
| 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 > | cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N) |
| Return the Cholesky factor of the specified size read from the specified vector. More... | |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N, T &lp) |
| Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian adjustment of the transform. More... | |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | cholesky_factor_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y) |
| Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor. More... | |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K) |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K, T &lp) |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | cholesky_corr_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x) |
| template<typename T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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 math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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 math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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 math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::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 |
Templated probability distributions.
All paramaterizations are based on Bayesian Data Analysis. Error handling for the distributions is described in Error Handling Policies.
| 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;
| T | Scalar type. |
| y | Input sequence. |
| ac | Autocorrelations. |
| fft | FFT engine instance. |
Definition at line 56 of file autocorrelation.hpp.
| 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
| T | Scalar type. |
| y | Input sequence. |
| ac | Autocorrelations. |
Definition at line 126 of file autocorrelation.hpp.
| 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;
| T | Scalar type. |
| y | Input sequence. |
| acov | Autocovariance. |
| fft | FFT engine instance. |
Definition at line 33 of file autocovariance.hpp.
| 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
| T | Scalar type. |
| y | Input sequence. |
| acov | Autocovariances. |
Definition at line 62 of file autocovariance.hpp.
| return_type<T_prob>::type stan::prob::bernoulli_ccdf_log | ( | const T_n & | n, |
| const T_prob & | theta | ||
| ) |
Definition at line 333 of file bernoulli.hpp.
| return_type<T_prob>::type stan::prob::bernoulli_cdf | ( | const T_n & | n, |
| const T_prob & | theta | ||
| ) |
Definition at line 212 of file bernoulli.hpp.
| return_type<T_prob>::type stan::prob::bernoulli_cdf_log | ( | const T_n & | n, |
| const T_prob & | theta | ||
| ) |
Definition at line 274 of file bernoulli.hpp.
| return_type<T_prob>::type stan::prob::bernoulli_log | ( | const T_n & | n, |
| const T_prob & | theta | ||
| ) |
Definition at line 25 of file bernoulli.hpp.
|
inline |
Definition at line 118 of file bernoulli.hpp.
| return_type<T_prob>::type stan::prob::bernoulli_logit_log | ( | const T_n & | n, |
| const T_prob & | theta | ||
| ) |
Definition at line 128 of file bernoulli.hpp.
|
inline |
Definition at line 204 of file bernoulli.hpp.
|
inline |
Definition at line 394 of file bernoulli.hpp.
| return_type<T_size1,T_size2>::type stan::prob::beta_binomial_ccdf_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_size1 & | alpha, | ||
| const T_size2 & | beta | ||
| ) |
Definition at line 428 of file beta_binomial.hpp.
| return_type<T_size1,T_size2>::type stan::prob::beta_binomial_cdf | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_size1 & | alpha, | ||
| const T_size2 & | beta | ||
| ) |
Definition at line 191 of file beta_binomial.hpp.
| return_type<T_size1,T_size2>::type stan::prob::beta_binomial_cdf_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_size1 & | alpha, | ||
| const T_size2 & | beta | ||
| ) |
Definition at line 314 of file beta_binomial.hpp.
| 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 28 of file beta_binomial.hpp.
| 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 182 of file beta_binomial.hpp.
|
inline |
Definition at line 541 of file beta_binomial.hpp.
| return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_ccdf_log | ( | const T_y & | y, |
| const T_scale_succ & | alpha, | ||
| const T_scale_fail & | beta | ||
| ) |
| 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 | ||
| ) |
Calculates the beta cumulative distribution function for the given variate and scale variables.
| y | A scalar variate. |
| alpha | Prior sample size. |
| beta | Prior sample size. |
| T_y | Type of y. |
| T_scale_succ | Type of alpha. |
| T_scale_fail | Type of beta. |
| return_type<T_y,T_scale_succ,T_scale_fail>::type stan::prob::beta_cdf_log | ( | const T_y & | y, |
| const T_scale_succ & | alpha, | ||
| const T_scale_fail & | beta | ||
| ) |
| 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 | ||
| ) |
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.
| y | (Sequence of) scalar(s). |
| alpha | (Sequence of) prior sample size(s). |
| beta | (Sequence of) prior sample size(s). |
| T_y | Type of scalar outcome. |
| T_scale_succ | Type of prior scale for successes. |
| T_scale_fail | Type of prior scale for failures. |
|
inline |
|
inline |
| return_type<T_prob>::type stan::prob::binomial_ccdf_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_prob & | theta | ||
| ) |
Definition at line 399 of file binomial.hpp.
| return_type<T_prob>::type stan::prob::binomial_cdf | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_prob & | theta | ||
| ) |
Definition at line 249 of file binomial.hpp.
| return_type<T_prob>::type stan::prob::binomial_cdf_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_prob & | theta | ||
| ) |
Definition at line 329 of file binomial.hpp.
| return_type<T_prob>::type stan::prob::binomial_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_prob & | theta | ||
| ) |
Definition at line 31 of file binomial.hpp.
|
inline |
Definition at line 129 of file binomial.hpp.
| return_type<T_prob>::type stan::prob::binomial_logit_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_prob & | alpha | ||
| ) |
Definition at line 142 of file binomial.hpp.
|
inline |
Definition at line 239 of file binomial.hpp.
|
inline |
Definition at line 470 of file binomial.hpp.
| boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log | ( | int | n, |
| const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & | theta | ||
| ) |
Definition at line 23 of file categorical.hpp.
|
inline |
Definition at line 59 of file categorical.hpp.
| boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_log | ( | const std::vector< int > & | ns, |
| const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & | theta | ||
| ) |
Definition at line 72 of file categorical.hpp.
|
inline |
Definition at line 124 of file categorical.hpp.
| boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_logit_log | ( | int | n, |
| const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & | beta | ||
| ) |
Definition at line 21 of file categorical_logit.hpp.
|
inline |
Definition at line 46 of file categorical_logit.hpp.
| boost::math::tools::promote_args<T_prob>::type stan::prob::categorical_logit_log | ( | const std::vector< int > & | ns, |
| const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & | beta | ||
| ) |
Definition at line 54 of file categorical_logit.hpp.
|
inline |
Definition at line 91 of file categorical_logit.hpp.
|
inline |
Definition at line 131 of file categorical.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 322 of file cauchy.hpp.
| 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 | ||
| ) |
Calculates the cauchy cumulative distribution function for the given variate, location, and scale.

Errors are configured by policy. All variables must be finite and the scale must be strictly greater than zero.
| y | A scalar variate. |
| mu | The location parameter. |
| sigma | The scale parameter. |
Definition at line 158 of file cauchy.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::cauchy_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 255 of file cauchy.hpp.
| 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 | ||
| ) |
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.
| y | (Sequence of) scalar(s). |
| mu | (Sequence of) location(s). |
| sigma | (Sequence of) scale(s). |
| T_y | Type of scalar outcome. |
| T_loc | Type of location. |
| T_scale | Type of scale. |
Definition at line 42 of file cauchy.hpp.
|
inline |
Definition at line 136 of file cauchy.hpp.
|
inline |
Definition at line 388 of file cauchy.hpp.
| return_type<T_y,T_dof>::type stan::prob::chi_square_ccdf_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Definition at line 348 of file chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::chi_square_cdf | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Calculates the chi square cumulative distribution function for the given variate and degrees of freedom.
y A scalar variate. nu Degrees of freedom.
Definition at line 154 of file chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::chi_square_cdf_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Definition at line 254 of file chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::chi_square_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
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.
| y | A scalar variable. |
| nu | Degrees of freedom. |
| std::domain_error | if nu is not greater than or equal to 0 |
| std::domain_error | if y is not greater than or equal to 0. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
Definition at line 43 of file chi_square.hpp.
|
inline |
Definition at line 139 of file chi_square.hpp.
|
inline |
Definition at line 442 of file chi_square.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cholesky_corr_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | y, |
| int | K | ||
| ) |
Definition at line 1512 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cholesky_corr_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | y, |
| int | K, | ||
| T & | lp | ||
| ) |
Definition at line 1550 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::cholesky_corr_free | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | x | ) |
Definition at line 1592 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cholesky_factor_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| int | M, | ||
| int | N | ||
| ) |
Return the Cholesky factor of the specified size read from the specified vector.
A total of (N choose 2) + N + (M - N) * N elements are required to read an M by N Cholesky factor.
| T | Type of scalars in matrix |
| x | Vector of unconstrained values |
| M | Number of rows |
| N | Number of columns |
Definition at line 1412 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cholesky_factor_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| int | M, | ||
| int | N, | ||
| T & | lp | ||
| ) |
Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian adjustment of the transform.
A total of (N choose 2) + N + N * (M - N) free parameters are required to read an M by N Cholesky factor.
| T | Type of scalars in matrix |
| x | Vector of unconstrained values |
| M | Number of rows |
| N | Number of columns |
| lp | Log probability that is incremented with the log Jacobian |
Definition at line 1455 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::cholesky_factor_free | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | y | ) |
Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor.
A Cholesky factor must be lower triangular and have positive diagonal elements.
| y | Cholesky factor. |
| std::domain_error | If the matrix is not a Cholesky factor. |
Definition at line 1485 of file transform.hpp.
|
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,
.
| x | Scalar input. |
| T | Type of scalar. |
Definition at line 952 of file transform.hpp.
|
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
.
| T | Type of scalar. |
Definition at line 970 of file transform.hpp.
|
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,
.
| y | Correlation scalar input. |
| T | Type of scalar. |
Definition at line 995 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::corr_matrix_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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
. The values in the input vector represent unconstrained (partial) correlations among the dimensions.
The transform based on partial correlations is as specified in
The free vector entries are first constrained to be valid correlation values using corr_constrain(T).
| x | Vector of unconstrained partial correlations. |
| k | Dimensionality of returned correlation matrix. |
| T | Type of scalar. |
| std::invalid_argument | if x is not a valid correlation matrix. |
Definition at line 1644 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::corr_matrix_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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
. 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.
| x | Vector of unconstrained partial correlations. |
| k | Dimensionality of returned correlation matrix. |
| lp | Log probability reference to increment. |
| T | Type of scalar. |
Definition at line 1682 of file transform.hpp.
| 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
partial correlations and then free those.
| y | The correlation matrix to free. |
| T | Type of scalar. |
| std::domain_error | if the correlation matrix has no elements or is not a square matrix. |
| std::runtime_error | if 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 1722 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::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.
| x | The vector to convert to a covariance matrix. |
| K | The number of rows and columns of the resulting covariance matrix. |
| std::domain_error | if (x.size() != K + (K choose 2)). |
Definition at line 1769 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> stan::prob::cov_matrix_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x, |
| typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::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.
| x | The vector to convert to a covariance matrix. |
| K | The dimensions of the resulting covariance matrix. |
| lp | Reference |
| std::domain_error | if (x.size() != K + (K choose 2)). |
Definition at line 1808 of file transform.hpp.
| 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
. The first
values in the input represent unconstrained (partial) correlations and the last
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.
| x | Input vector of unconstrained partial correlations and standard deviations. |
| k | Dimensionality of returned covariance matrix. |
| T | Type of scalar. |
Definition at line 1910 of file transform.hpp.
| 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.
| x | Input vector of unconstrained partial correlations and standard deviations. |
| k | Dimensionality of returned covariance matrix. |
| lp | Log probability reference to increment. |
| T | Type of scalar. |
Definition at line 1949 of file transform.hpp.
| 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
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.
| y | Matrix of dimensions K by K such that he symmetric view of the lower-triangular view is positive definite. |
| std::domain_error | if y is not square, has zero dimensionality, or has a non-positive diagonal element. |
Definition at line 1863 of file transform.hpp.
| 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&).
| y | Covariance matrix to free. |
| T | Type of scalar. |
| std::domain_error | if the correlation matrix has no elements or is not a square matrix. |
| std::runtime_error | if the correlation matrix cannot be factorized by factor_cov_matrix() |
Definition at line 1983 of file transform.hpp.
| 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 | ||
| ) |
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.
| theta | A scalar vector. |
| alpha | Prior sample sizes. |
| std::domain_error | if any element of alpha is less than or equal to 0. |
| std::domain_error | if any element of theta is less than 0. |
| std::domain_error | if the sum of theta is not 1. |
| T_prob | Type of scalar. |
| T_prior_sample_size | Type of prior sample sizes. |
Definition at line 46 of file dirichlet.hpp.
|
inline |
Definition at line 77 of file dirichlet.hpp.
|
inline |
Definition at line 84 of file dirichlet.hpp.
| T_shape stan::prob::do_lkj_constant | ( | const T_shape & | eta, |
| const unsigned int & | K | ||
| ) |
Definition at line 15 of file lkj_corr.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 291 of file double_exponential.hpp.
| 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 | ||
| ) |
Calculates the double exponential cumulative density function.

| y | A scalar variate. |
| mu | The location parameter. |
| sigma | The scale parameter. |
Definition at line 138 of file double_exponential.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::double_exponential_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 215 of file double_exponential.hpp.
| 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 24 of file double_exponential.hpp.
| 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 117 of file double_exponential.hpp.
|
inline |
Definition at line 367 of file double_exponential.hpp.
| return_type<T_y,T_loc,T_scale,T_inv_scale>::type stan::prob::exp_mod_normal_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_inv_scale & | lambda | ||
| ) |
Definition at line 356 of file exp_mod_normal.hpp.
| return_type<T_y,T_loc,T_scale,T_inv_scale>::type stan::prob::exp_mod_normal_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_inv_scale & | lambda | ||
| ) |
Definition at line 140 of file exp_mod_normal.hpp.
| return_type<T_y,T_loc,T_scale,T_inv_scale>::type stan::prob::exp_mod_normal_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_inv_scale & | lambda | ||
| ) |
Definition at line 252 of file exp_mod_normal.hpp.
| return_type<T_y,T_loc,T_scale, T_inv_scale>::type stan::prob::exp_mod_normal_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_inv_scale & | lambda | ||
| ) |
Definition at line 26 of file exp_mod_normal.hpp.
|
inline |
Definition at line 132 of file exp_mod_normal.hpp.
|
inline |
Definition at line 458 of file exp_mod_normal.hpp.
| return_type<T_y,T_inv_scale>::type stan::prob::exponential_ccdf_log | ( | const T_y & | y, |
| const T_inv_scale & | beta | ||
| ) |
Definition at line 221 of file exponential.hpp.
| return_type<T_y,T_inv_scale>::type stan::prob::exponential_cdf | ( | const T_y & | y, |
| const T_inv_scale & | beta | ||
| ) |
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.
| y | A scalar variable. |
| beta | Inverse scale parameter. |
| T_y | Type of scalar. |
| T_inv_scale | Type of inverse scale. |
| Policy | Error-handling policy. |
Definition at line 122 of file exponential.hpp.
| return_type<T_y,T_inv_scale>::type stan::prob::exponential_cdf_log | ( | const T_y & | y, |
| const T_inv_scale & | beta | ||
| ) |
Definition at line 175 of file exponential.hpp.
| return_type<T_y,T_inv_scale>::type stan::prob::exponential_log | ( | const T_y & | y, |
| const T_inv_scale & | beta | ||
| ) |
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.
| y | A scalar variable. |
| beta | Inverse scale parameter. |
| std::domain_error | if beta is not greater than 0. |
| std::domain_error | if y is not greater than or equal to 0. |
| T_y | Type of scalar. |
| T_inv_scale | Type of inverse scale. |
Definition at line 46 of file exponential.hpp.
|
inline |
Definition at line 101 of file exponential.hpp.
|
inline |
Definition at line 265 of file exponential.hpp.
| bool stan::prob::factor_cov_matrix | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | Sigma, |
| Eigen::Array< T, Eigen::Dynamic, 1 > & | CPCs, | ||
| Eigen::Array< T, Eigen::Dynamic, 1 > & | sds | ||
| ) |
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
| [in] | Sigma | covariance matrix |
| [out] | CPCs | fill this unbounded (does not resize) |
| [out] | sds | fill this unbounded (does not resize) |
Definition at line 88 of file transform.hpp.
| void stan::prob::factor_U | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | U, |
| Eigen::Array< T, Eigen::Dynamic, 1 > & | CPCs | ||
| ) |
This function is intended to make starting values, given a unit upper-triangular matrix U such that U'DU is a correlation matrix.
| CPCs | fill this unbounded |
| Sigma | U matrix |
Definition at line 43 of file transform.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::frechet_ccdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 244 of file frechet.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::frechet_cdf | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 131 of file frechet.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::frechet_cdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 193 of file frechet.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::frechet_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 24 of file frechet.hpp.
|
inline |
Definition at line 125 of file frechet.hpp.
|
inline |
Definition at line 297 of file frechet.hpp.
| return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_ccdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
| return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_cdf | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
The cumulative density function for a gamma distribution for y with the specified shape and inverse scale parameters.
| y | A scalar variable. |
| alpha | Shape parameter. |
| beta | Inverse scale parameter. |
| std::domain_error | if alpha is not greater than 0. |
| std::domain_error | if beta is not greater than 0. |
| std::domain_error | if y is not greater than or equal to 0. |
| T_y | Type of scalar. |
| T_shape | Type of shape. |
| T_inv_scale | Type of inverse scale. |
| return_type<T_y,T_shape,T_inv_scale>::type stan::prob::gamma_cdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
| 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 | ||
| ) |
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.
| y | A scalar variable. |
| alpha | Shape parameter. |
| beta | Inverse scale parameter. |
| std::domain_error | if alpha is not greater than 0. |
| std::domain_error | if beta is not greater than 0. |
| std::domain_error | if y is not greater than or equal to 0. |
| T_y | Type of scalar. |
| T_shape | Type of shape. |
| T_inv_scale | Type of inverse scale. |
|
inline |
|
inline |
| return_type< T_y, typename return_type<T_F,T_G,T_V,T_W,T_m0,T_C0>::type >::type stan::prob::gaussian_dlm_obs_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & | F, | ||
| const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & | G, | ||
| const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > & | V, | ||
| const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & | W, | ||
| const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & | m0, | ||
| const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & | C0 | ||
| ) |
The log of a Gaussian dynamic linear model (GDLM).
This distribution is equivalent to, for
,
If V is a vector, then the Kalman filter is applied sequentially.
| y | A r x T matrix of observations. Rows are variables, columns are observations. |
| F | A n x r matrix. The design matrix. |
| G | A n x n matrix. The transition matrix. |
| V | A r x r matrix. The observation covariance matrix. |
| W | A n x n matrix. The state covariance matrix. |
| m0 | A n x 1 matrix. The mean vector of the distribution of the initial state. |
| C0 | A n x n matrix. The covariance matrix of the distribution of the initial state. |
| std::domain_error | if a matrix in the Kalman filter is not positive semi-definite. |
| T_y | Type of scalar. |
| T_F | Type of design matrix. |
| T_G | Type of transition matrix. |
| T_V | Type of observation covariance matrix. |
| T_W | Type of state covariance matrix. |
| T_m0 | Type of initial state mean vector. |
| T_C0 | Type of initial state covariance matrix. |
Definition at line 80 of file gaussian_dlm_obs.hpp.
|
inline |
Definition at line 234 of file gaussian_dlm_obs.hpp.
| return_type< T_y, typename return_type<T_F,T_G,T_V,T_W,T_m0,T_C0>::type >::type stan::prob::gaussian_dlm_obs_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & | F, | ||
| const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & | G, | ||
| const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > & | V, | ||
| const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & | W, | ||
| const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & | m0, | ||
| const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & | C0 | ||
| ) |
The log of a Gaussian dynamic linear model (GDLM) with uncorrelated observation disturbances.
This distribution is equivalent to, for
,
If V is a vector, then the Kalman filter is applied sequentially.
| y | A r x T matrix of observations. Rows are variables, columns are observations. |
| F | A n x r matrix. The design matrix. |
| G | A n x n matrix. The transition matrix. |
| V | A size r vector. The diagonal of the observation covariance matrix. |
| W | A n x n matrix. The state covariance matrix. |
| m0 | A n x 1 matrix. The mean vector of the distribution of the initial state. |
| C0 | A n x n matrix. The covariance matrix of the distribution of the initial state. |
| std::domain_error | if a matrix in the Kalman filter is not semi-positive definite. |
| T_y | Type of scalar. |
| T_F | Type of design matrix. |
| T_G | Type of transition matrix. |
| T_V | Type of observation variances |
| T_W | Type of state covariance matrix. |
| T_m0 | Type of initial state mean vector. |
| T_C0 | Type of initial state covariance matrix. |
Definition at line 288 of file gaussian_dlm_obs.hpp.
|
inline |
Definition at line 447 of file gaussian_dlm_obs.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::gumbel_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 234 of file gumbel.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::gumbel_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 113 of file gumbel.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::gumbel_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 181 of file gumbel.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::gumbel_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 21 of file gumbel.hpp.
|
inline |
Definition at line 107 of file gumbel.hpp.
|
inline |
Definition at line 289 of file gumbel.hpp.
| double stan::prob::hypergeometric_log | ( | const T_n & | n, |
| const T_N & | N, | ||
| const T_a & | a, | ||
| const T_b & | b | ||
| ) |
Definition at line 25 of file hypergeometric.hpp.
|
inline |
Definition at line 83 of file hypergeometric.hpp.
|
inline |
Definition at line 92 of file hypergeometric.hpp.
|
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.
| x | Free scalar. |
| T | Type of scalar. |
Definition at line 391 of file transform.hpp.
|
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.
| x | Free scalar. lp Reference to log probability. |
| T | Type of scalar. |
Definition at line 410 of file transform.hpp.
|
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.
| y | Constrained scalar. |
| T | Type of scalar. |
Definition at line 427 of file transform.hpp.
| return_type<T_y,T_dof>::type stan::prob::inv_chi_square_ccdf_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Definition at line 332 of file inv_chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::inv_chi_square_cdf | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Definition at line 137 of file inv_chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::inv_chi_square_cdf_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
Definition at line 239 of file inv_chi_square.hpp.
| return_type<T_y,T_dof>::type stan::prob::inv_chi_square_log | ( | const T_y & | y, |
| const T_dof & | nu | ||
| ) |
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.
| y | A scalar variable. |
| nu | Degrees of freedom. |
| std::domain_error | if nu is not greater than or equal to 0 |
| std::domain_error | if y is not greater than or equal to 0. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
Definition at line 43 of file inv_chi_square.hpp.
|
inline |
Definition at line 131 of file inv_chi_square.hpp.
|
inline |
Definition at line 425 of file inv_chi_square.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_ccdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 401 of file inv_gamma.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_cdf | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | beta | ||
| ) |
The CDF of an inverse gamma density for y with the specified shape and scale parameters.
y, shape, and scale parameters must be greater than 0.
| y | A scalar variable. |
| alpha | Shape parameter. |
| beta | Scale parameter. |
| std::domain_error | if alpha is not greater than 0. |
| std::domain_error | if beta is not greater than 0. |
| std::domain_error | if y is not greater than 0. |
| T_y | Type of scalar. |
| T_shape | Type of shape. |
| T_scale | Type of scale. |
Definition at line 177 of file inv_gamma.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::inv_gamma_cdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | beta | ||
| ) |
Definition at line 294 of file inv_gamma.hpp.
| 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 | ||
| ) |
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.
| y | A scalar variable. |
| alpha | Shape parameter. |
| beta | Scale parameter. |
| std::domain_error | if alpha is not greater than 0. |
| std::domain_error | if beta is not greater than 0. |
| std::domain_error | if y is not greater than 0. |
| T_y | Type of scalar. |
| T_shape | Type of shape. |
| T_scale | Type of scale. |
Definition at line 40 of file inv_gamma.hpp.
|
inline |
Definition at line 155 of file inv_gamma.hpp.
|
inline |
Definition at line 508 of file inv_gamma.hpp.
| 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 | ||
| ) |
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.
| W | A scalar matrix |
| nu | Degrees of freedom |
| S | The scale matrix |
| std::domain_error | if nu is not greater than k-1 |
| std::domain_error | if S is not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
| T_scale | Type of scale. |
Definition at line 52 of file inv_wishart.hpp.
|
inline |
Definition at line 125 of file inv_wishart.hpp.
|
inline |
Definition at line 133 of file inv_wishart.hpp.
|
inline |
Return the lower-bounded value for the specified unconstrained input and specified lower bound.
The transform applied is

where
is the constant lower bound.
If the lower bound is negative infinity, this function reduces to identity_constrain(x).
| x | Unconstrained scalar input. |
| lb | Lower-bound on constrained ouptut. |
| T | Type of scalar. |
| TL | Type of lower bound. |
Definition at line 520 of file transform.hpp.
|
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).
| x | Unconstrained scalar input. |
| lb | Lower-bound on output. |
| lp | Reference to log probability to increment. |
| T | Type of scalar. |
| TL | Type of lower bound. |
Definition at line 545 of file transform.hpp.
|
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).
| y | Input scalar. |
| lb | Lower bound. |
| T | Type of scalar. |
| TL | Type of lower bound. |
| std::domain_error | if y is lower than the lower bound. |
Definition at line 570 of file transform.hpp.
| 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 | ||
| ) |
Definition at line 48 of file lkj_corr.hpp.
|
inline |
Definition at line 92 of file lkj_corr.hpp.
|
inline |
Definition at line 153 of file lkj_corr.hpp.
| 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 | ||
| ) |
Definition at line 103 of file lkj_corr.hpp.
|
inline |
Definition at line 146 of file lkj_corr.hpp.
|
inline |
Definition at line 178 of file lkj_corr.hpp.
| 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 | ||
| ) |
Definition at line 23 of file lkj_cov.hpp.
|
inline |
Definition at line 76 of file lkj_cov.hpp.
| 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 | ||
| ) |
Definition at line 88 of file lkj_cov.hpp.
|
inline |
Definition at line 124 of file lkj_cov.hpp.
|
inline |
Definition at line 24 of file ordered_logistic.hpp.
| return_type<T_y, T_loc, T_scale>::type stan::prob::logistic_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 315 of file logistic.hpp.
| return_type<T_y, T_loc, T_scale>::type stan::prob::logistic_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 143 of file logistic.hpp.
| return_type<T_y, T_loc, T_scale>::type stan::prob::logistic_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 237 of file logistic.hpp.
| 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 | ||
| ) |
Definition at line 27 of file logistic.hpp.
|
inline |
Definition at line 136 of file logistic.hpp.
|
inline |
Definition at line 393 of file logistic.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 292 of file lognormal.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 150 of file lognormal.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::lognormal_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 225 of file lognormal.hpp.
| 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 | ||
| ) |
Definition at line 24 of file lognormal.hpp.
|
inline |
Definition at line 143 of file lognormal.hpp.
|
inline |
Definition at line 360 of file lognormal.hpp.
|
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,

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).
| x | Free scalar to transform. |
| lb | Lower bound. |
| ub | Upper bound. |
| T | Type of scalar. |
| TL | Type of lower bound. |
| TU | Type of upper bound. |
| std::domain_error | if ub <= lb |
Definition at line 710 of file transform.hpp.
| 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



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).
| x | Free scalar to transform. |
| lb | Lower bound. |
| ub | Upper bound. |
| lp | Log probability scalar reference. |
| T | Type of scalar. |
| TL | Type of lower bound. |
| TU | Type of upper bound. |
| std::domain_error | if ub <= lb |
Definition at line 780 of file transform.hpp.
|
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,

where
and
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).
| T | Type of scalar. |
| y | Scalar input. |
| lb | Lower bound. |
| ub | Upper bound. |
| std::invalid_argument | if 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 845 of file transform.hpp.
| 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
| eta | hyperparameter on (0,inf), eta = 1 <-> correlation matrix is uniform |
| K | number of variables in covariance matrix |
Definition at line 343 of file transform.hpp.
| boost::math::tools::promote_args<T_y,T_Mu,T_Sigma,T_D>::type stan::prob::matrix_normal_prec_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > & | Mu, | ||
| const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > & | Sigma, | ||
| const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > & | D | ||
| ) |
The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices.
| y | An mxn matrix. |
| Mu | The mean matrix. |
| Sigma | The mxm inverse covariance matrix (i.e., the precision matrix) of the rows of y. |
| D | The nxn inverse covariance matrix (i.e., the precision matrix) of the columns of y. |
| std::domain_error | if Sigma or D are not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_Mu | Type of location. |
| T_Sigma | Type of Sigma. |
| T_D | Type of D. |
Definition at line 41 of file matrix_normal.hpp.
| boost::math::tools::promote_args<T_y,T_Mu,T_Sigma,T_D>::type stan::prob::matrix_normal_prec_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > & | Mu, | ||
| const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > & | Sigma, | ||
| const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > & | D | ||
| ) |
Definition at line 117 of file matrix_normal.hpp.
| boost::math::tools::promote_args<T_y,T_covar,T_w>::type stan::prob::multi_gp_cholesky_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & | L, | ||
| const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & | w | ||
| ) |
The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel matrix Sigma.
Sigma = LL', a square, semi-positive definite matrix.. y is a dxN matrix, where each column is a different observation and each row is a different output dimension. The Gaussian Process is assumed to have a scaled kernel matrix with a different scale for each output dimension. This distribution is equivalent to: for (i in 1:d) row(y,i) ~ multi_normal(0,(1/w[i])*LL').
| y | A dxN matrix |
| L | The Cholesky decomposition of a kernel matrix |
| w | A d-dimensional vector of positve inverse scale parameters for each output. |
| std::domain_error | if Sigma is not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_covar | Type of kernel. |
| T_w | Type of weight. |
Definition at line 45 of file multi_gp_cholesky.hpp.
|
inline |
Definition at line 106 of file multi_gp_cholesky.hpp.
| boost::math::tools::promote_args<T_y,T_covar,T_w>::type stan::prob::multi_gp_log | ( | const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & | y, |
| const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & | Sigma, | ||
| const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & | w | ||
| ) |
The log of a multivariate Gaussian Process for the given y, Sigma, and w.
y is a dxN matrix, where each column is a different observation and each row is a different output dimension. The Gaussian Process is assumed to have a scaled kernel matrix with a different scale for each output dimension. This distribution is equivalent to: for (i in 1:d) row(y,i) ~ multi_normal(0,(1/w[i])*Sigma).
| y | A dxN matrix |
| Sigma | The NxN kernel matrix |
| w | A d-dimensional vector of positve inverse scale parameters for each output. |
| std::domain_error | if Sigma is not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_covar | Type of kernel. |
| T_w | Type of weight. |
Definition at line 45 of file multi_gp.hpp.
|
inline |
Definition at line 115 of file multi_gp.hpp.
| boost::math::tools::promote_args<typename scalar_type<T_y>::type, typename scalar_type<T_loc>::type, T_covar>::type stan::prob::multi_normal_cholesky_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & | L | ||
| ) |
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.
| y | A scalar vector |
| mu | The mean vector of the multivariate normal distribution. |
| L | The Cholesky decomposition of a variance matrix of the multivariate normal distribution |
| std::domain_error | if LL' is not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_loc | Type of location. |
| T_covar | Type of scale. |
Definition at line 53 of file multi_normal_cholesky.hpp.
|
inline |
Definition at line 159 of file multi_normal_cholesky.hpp.
|
inline |
Definition at line 167 of file multi_normal_cholesky.hpp.
| boost::math::tools::promote_args<typename scalar_type<T_y>::type, typename scalar_type<T_loc>::type, T_covar>::type stan::prob::multi_normal_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & | Sigma | ||
| ) |
Definition at line 27 of file multi_normal.hpp.
|
inline |
Definition at line 131 of file multi_normal.hpp.
| boost::math::tools::promote_args<typename scalar_type<T_y>::type, typename scalar_type<T_loc>::type, T_covar>::type stan::prob::multi_normal_prec_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & | Sigma | ||
| ) |
Definition at line 34 of file multi_normal_prec.hpp.
|
inline |
Definition at line 147 of file multi_normal_prec.hpp.
|
inline |
Definition at line 139 of file multi_normal.hpp.
| boost::math::tools::promote_args<typename scalar_type<T_y>::type,T_dof,typename scalar_type<T_loc>::type,T_scale>::type stan::prob::multi_student_t_log | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_loc & | mu, | ||
| const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > & | Sigma | ||
| ) |
Return the log of the multivariate Student t distribution at the specified arguments.
| propto | Carry out calculations up to a proportion |
Definition at line 35 of file multi_student_t.hpp.
|
inline |
Definition at line 172 of file multi_student_t.hpp.
|
inline |
Definition at line 184 of file multi_student_t.hpp.
| 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 25 of file multinomial.hpp.
| 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 61 of file multinomial.hpp.
|
inline |
Definition at line 68 of file multinomial.hpp.
| return_type<T_location, T_inv_scale>::type stan::prob::neg_binomial_2_log | ( | const T_n & | n, |
| const T_location & | mu, | ||
| const T_inv_scale & | phi | ||
| ) |
Definition at line 31 of file neg_binomial_2.hpp.
|
inline |
Definition at line 138 of file neg_binomial_2.hpp.
| return_type<T_log_location, T_inv_scale>::type stan::prob::neg_binomial_2_log_log | ( | const T_n & | n, |
| const T_log_location & | eta, | ||
| const T_inv_scale & | phi | ||
| ) |
Definition at line 150 of file neg_binomial_2.hpp.
|
inline |
Definition at line 258 of file neg_binomial_2.hpp.
|
inline |
Definition at line 286 of file neg_binomial_2.hpp.
|
inline |
Definition at line 266 of file neg_binomial_2.hpp.
| return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_ccdf_log | ( | const T_n & | n, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
Definition at line 428 of file neg_binomial.hpp.
| return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_cdf | ( | const T_n & | n, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
Definition at line 181 of file neg_binomial.hpp.
| return_type<T_shape, T_inv_scale>::type stan::prob::neg_binomial_cdf_log | ( | const T_n & | n, |
| const T_shape & | alpha, | ||
| const T_inv_scale & | beta | ||
| ) |
Definition at line 314 of file neg_binomial.hpp.
| 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 | ||
| ) |
Definition at line 30 of file neg_binomial.hpp.
|
inline |
Definition at line 171 of file neg_binomial.hpp.
|
inline |
Definition at line 541 of file neg_binomial.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::normal_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 305 of file normal.hpp.
| 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 | ||
| ) |
Calculates the normal cumulative distribution function for the given variate, location, and scale.
.
Errors are configured by policy. All variables must be finite and the scale must be strictly greater than zero.
| y | A scalar variate. |
| mu | The location of the normal distribution. |
| sigma | The scale of the normal distriubtion |
| T_y | Type of y. |
| T_loc | Type of mean parameter. |
| T_scale | Type of standard deviation paramater. |
| Policy | Error-handling policy. |
Definition at line 152 of file normal.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::normal_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 233 of file normal.hpp.
| boost::enable_if_c<contains_fvar<T_y,T_loc,T_scale>::value, typename return_type<T_y,T_loc,T_scale>::type>::type stan::prob::normal_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 22 of file normal.hpp.
| boost::enable_if_c<is_var_or_arithmetic<T_y,T_loc,T_scale>::value, typename return_type<T_y,T_loc,T_scale>::type>::type stan::prob::normal_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
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.
| y | (Sequence of) scalar(s). |
| mu | (Sequence of) location parameter(s) for the normal distribution. |
| sigma | (Sequence of) scale parameters for the normal distribution. |
| std::domain_error | if the scale is not positive. |
| T_y | Underlying type of scalar in sequence. |
| T_loc | Type of location parameter. |
Definition at line 41 of file normal.hpp.
|
inline |
Definition at line 128 of file normal.hpp.
|
inline |
Definition at line 377 of file normal.hpp.
| 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.
| x | Free vector of scalars. |
| T | Type of scalar. |
Definition at line 1224 of file transform.hpp.
|
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.
| x | Free vector of scalars. |
| lp | Log probability reference. |
| T | Type of scalar. |
Definition at line 1256 of file transform.hpp.
| 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),
| y | Vector of positive, ordered scalars. |
| T | Type of scalar. |
| std::domain_error | if y is not a vector of positive, ordered scalars. |
Definition at line 1285 of file transform.hpp.
| 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 | ||
| ) |
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.
| propto | True if calculating up to a proportion. |
| T_loc | Location type. |
| T_cut | Cut-point type. |
| Policy | Error policy (only its type matters). |
| y | Outcome. |
| lambda | Location. |
| c | Positive increasing vector of cutpoints. |
| std::domain_error | If 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 60 of file ordered_logistic.hpp.
| 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 108 of file ordered_logistic.hpp.
|
inline |
Definition at line 115 of file ordered_logistic.hpp.
| return_type<T_y, T_scale, T_shape>::type stan::prob::pareto_ccdf_log | ( | const T_y & | y, |
| const T_scale & | y_min, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 303 of file pareto.hpp.
| return_type<T_y, T_scale, T_shape>::type stan::prob::pareto_cdf | ( | const T_y & | y, |
| const T_scale & | y_min, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 128 of file pareto.hpp.
| return_type<T_y, T_scale, T_shape>::type stan::prob::pareto_cdf_log | ( | const T_y & | y, |
| const T_scale & | y_min, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 223 of file pareto.hpp.
| 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 | ||
| ) |
Definition at line 24 of file pareto.hpp.
|
inline |
Definition at line 122 of file pareto.hpp.
|
inline |
Definition at line 379 of file pareto.hpp.
| return_type<T_y, T_loc, T_scale, T_shape>::type stan::prob::pareto_type_2_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | lambda, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 381 of file pareto_type_2.hpp.
| return_type<T_y, T_loc, T_scale, T_shape>::type stan::prob::pareto_type_2_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | lambda, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 140 of file pareto_type_2.hpp.
| return_type<T_y, T_loc, T_scale, T_shape>::type stan::prob::pareto_type_2_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | lambda, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 270 of file pareto_type_2.hpp.
| return_type<T_y,T_loc,T_scale,T_shape>::type stan::prob::pareto_type_2_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | lambda, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 24 of file pareto_type_2.hpp.
|
inline |
Definition at line 133 of file pareto_type_2.hpp.
|
inline |
Definition at line 495 of file pareto_type_2.hpp.
| return_type<T_rate>::type stan::prob::poisson_ccdf_log | ( | const T_n & | n, |
| const T_rate & | lambda | ||
| ) |
Definition at line 322 of file poisson.hpp.
| return_type<T_rate>::type stan::prob::poisson_cdf | ( | const T_n & | n, |
| const T_rate & | lambda | ||
| ) |
Definition at line 194 of file poisson.hpp.
| return_type<T_rate>::type stan::prob::poisson_cdf_log | ( | const T_n & | n, |
| const T_rate & | lambda | ||
| ) |
Definition at line 260 of file poisson.hpp.
| return_type<T_rate>::type stan::prob::poisson_log | ( | const T_n & | n, |
| const T_rate & | lambda | ||
| ) |
Definition at line 27 of file poisson.hpp.
|
inline |
Definition at line 101 of file poisson.hpp.
| return_type<T_log_rate>::type stan::prob::poisson_log_log | ( | const T_n & | n, |
| const T_log_rate & | alpha | ||
| ) |
Definition at line 109 of file poisson.hpp.
|
inline |
Definition at line 187 of file poisson.hpp.
|
inline |
Definition at line 384 of file poisson.hpp.
|
inline |
Return the positive value for the specified unconstrained input.
The transform applied is
.
| x | Arbitrary input scalar. |
Definition at line 446 of file transform.hpp.
|
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
.
| x | Arbitrary input scalar. |
| lp | Log probability reference. |
| T | Type of scalar. |
Definition at line 468 of file transform.hpp.
|
inline |
Return the unconstrained value corresponding to the specified positive-constrained value.
The transform is the inverse of the transform
applied by positive_constrain(T), namely
.
The input is validated using stan::math::check_positive().
| y | Input scalar. |
| T | Type of scalar. |
| std::domain_error | if the variable is negative. |
Definition at line 491 of file transform.hpp.
| 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.
| x | Free vector of scalars. |
| T | Type of scalar. |
Definition at line 1317 of file transform.hpp.
|
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.
| x | Free vector of scalars. |
| lp | Log probability reference. |
| T | Type of scalar. |
Definition at line 1348 of file transform.hpp.
| 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),
| y | Vector of positive, ordered scalars. |
| T | Type of scalar. |
| std::domain_error | if y is not a vector of positive, ordered scalars. |
Definition at line 1376 of file transform.hpp.
|
inline |
Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar.
The transform is the inverse logit,
.
| x | Free scalar. |
| T | Type of scalar. |
Definition at line 875 of file transform.hpp.
|
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
.
| x | Free scalar. |
| lp | Log probability reference. |
| T | Type of scalar. |
Definition at line 903 of file transform.hpp.
|
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,
.
| y | Scalar input. |
| T | Type of scalar. |
| std::domain_error | if y is less than 0 or greater than 1. |
Definition at line 927 of file transform.hpp.
| return_type<T_y,T_scale>::type stan::prob::rayleigh_ccdf_log | ( | const T_y & | y, |
| const T_scale & | sigma | ||
| ) |
Definition at line 239 of file rayleigh.hpp.
| return_type<T_y,T_scale>::type stan::prob::rayleigh_cdf | ( | const T_y & | y, |
| const T_scale & | sigma | ||
| ) |
Definition at line 105 of file rayleigh.hpp.
| return_type<T_y,T_scale>::type stan::prob::rayleigh_cdf_log | ( | const T_y & | y, |
| const T_scale & | sigma | ||
| ) |
Definition at line 176 of file rayleigh.hpp.
| return_type<T_y,T_scale>::type stan::prob::rayleigh_log | ( | const T_y & | y, |
| const T_scale & | sigma | ||
| ) |
Definition at line 21 of file rayleigh.hpp.
|
inline |
Definition at line 99 of file rayleigh.hpp.
|
inline |
Definition at line 299 of file rayleigh.hpp.
| 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.
| CPCs | The (K choose 2) canonical partial correlations in (-1,1). |
| K | Dimensionality of correlation matrix. |
| T | Type of underlying scalar. |
Definition at line 139 of file transform.hpp.
| 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:
| CPCs | The (K choose 2) canonical partial correlations in (-1,1). |
| K | Dimensionality of correlation matrix. |
| log_prob | Reference to variable to increment with the log Jacobian determinant. |
| T | Type of underlying scalar. |
Definition at line 215 of file transform.hpp.
| 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.
| CPCs | The (K choose 2) canonical partial correlations in (-1,1). |
| K | Dimensionality of correlation matrix. |
| T | Type of underlying scalar. |
Definition at line 181 of file transform.hpp.
| 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.
| CPCs | The (K choose 2) canonical partial correlations in (-1,1). |
| K | Dimensionality of correlation matrix. |
| log_prob | Reference to variable to increment with the log Jacobian determinant. |
| T | Type of underlying scalar. |
Definition at line 258 of file transform.hpp.
| 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.
| CPCs | on (-1,1) |
| sds | on (0,inf) |
| log_prob | the log probability value to increment with the Jacobian |
Definition at line 280 of file transform.hpp.
| 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.
| CPCs | on (-1,1) |
| sds | on (0,inf) |
| log_prob | the log probability value to increment with the Jacobian |
Definition at line 300 of file transform.hpp.
| 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.
| CPCs | in (-1,1) |
| sds | in (0,inf) |
Definition at line 319 of file transform.hpp.
| return_type<T_y, T_dof, T_scale>::type stan::prob::scaled_inv_chi_square_ccdf_log | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_scale & | s | ||
| ) |
Definition at line 419 of file scaled_inv_chi_square.hpp.
| return_type<T_y, T_dof, T_scale>::type stan::prob::scaled_inv_chi_square_cdf | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_scale & | s | ||
| ) |
The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter.
| y | A scalar variable. |
| nu | Degrees of freedom. |
| s | Scale parameter. |
| std::domain_error | if nu is not greater than 0 |
| std::domain_error | if s is not greater than 0. |
| std::domain_error | if y is not greater than 0. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
Definition at line 187 of file scaled_inv_chi_square.hpp.
| return_type<T_y, T_dof, T_scale>::type stan::prob::scaled_inv_chi_square_cdf_log | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_scale & | s | ||
| ) |
Definition at line 310 of file scaled_inv_chi_square.hpp.
| 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 | ||
| ) |
The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter.
| y | A scalar variable. |
| nu | Degrees of freedom. |
| s | Scale parameter. |
| std::domain_error | if nu is not greater than 0 |
| std::domain_error | if s is not greater than 0. |
| std::domain_error | if y is not greater than 0. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
Definition at line 44 of file scaled_inv_chi_square.hpp.
|
inline |
Definition at line 167 of file scaled_inv_chi_square.hpp.
|
inline |
Definition at line 528 of file scaled_inv_chi_square.hpp.
| 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.
| y | Free vector input of dimensionality K - 1. |
| T | Type of scalar. |
Definition at line 1103 of file transform.hpp.
| 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.
| y | Free vector input of dimensionality K - 1. |
| lp | Log probability reference to increment. |
| T | Type of scalar. |
Definition at line 1142 of file transform.hpp.
| 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.
| x | Simplex of dimensionality K. |
| T | Type of scalar. |
| std::domain_error | if x is not a valid simplex |
Definition at line 1188 of file transform.hpp.
| return_type<T_y,T_loc,T_scale,T_shape>::type stan::prob::skew_normal_ccdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 320 of file skew_normal.hpp.
| return_type<T_y,T_loc,T_scale,T_shape>::type stan::prob::skew_normal_cdf | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 141 of file skew_normal.hpp.
| return_type<T_y,T_loc,T_scale,T_shape>::type stan::prob::skew_normal_cdf_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 237 of file skew_normal.hpp.
| return_type<T_y,T_loc,T_scale,T_shape>::type stan::prob::skew_normal_log | ( | const T_y & | y, |
| const T_loc & | mu, | ||
| const T_scale & | sigma, | ||
| const T_shape & | alpha | ||
| ) |
Definition at line 23 of file skew_normal.hpp.
|
inline |
Definition at line 134 of file skew_normal.hpp.
|
inline |
Definition at line 403 of file skew_normal.hpp.
| return_type<T_y, T_dof, T_loc, T_scale>::type stan::prob::student_t_ccdf_log | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 555 of file student_t.hpp.
| return_type<T_y, T_dof, T_loc, T_scale>::type stan::prob::student_t_cdf | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 219 of file student_t.hpp.
| return_type<T_y, T_dof, T_loc, T_scale>::type stan::prob::student_t_cdf_log | ( | const T_y & | y, |
| const T_dof & | nu, | ||
| const T_loc & | mu, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 393 of file student_t.hpp.
| 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 | ||
| ) |
The log of the Student-t density for the given y, nu, mean, and scale parameter.
The scale parameter must be greater than 0.
| y | A scalar variable. |
| nu | Degrees of freedom. |
| mu | The mean of the Student-t distribution. |
| sigma | The scale parameter of the Student-t distribution. |
| std::domain_error | if sigma is not greater than 0. |
| std::domain_error | if nu is not greater than 0. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
| T_loc | Type of location. |
| T_scale | Type of scale. |
Definition at line 49 of file student_t.hpp.
|
inline |
Definition at line 212 of file student_t.hpp.
|
inline |
Definition at line 717 of file student_t.hpp.
|
inline |
Return the upper-bounded value for the specified unconstrained scalar and upper bound.
The transform is

where
is the upper bound.
If the upper bound is positive infinity, this function reduces to identity_constrain(x).
| x | Free scalar. |
| ub | Upper bound. |
| T | Type of scalar. |
| TU | Type of upper bound. |
Definition at line 604 of file transform.hpp.
|
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
.
If the upper bound is positive infinity, this function reduces to identity_constrain(x,lp).
| x | Free scalar. |
| ub | Upper bound. |
| lp | Log probability reference. |
| T | Type of scalar. |
| TU | Type of upper bound. |
Definition at line 636 of file transform.hpp.
|
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,

where
is the upper bound.
If the upper bound is positive infinity, this function reduces to identity_free(y).
| y | Upper-bounded scalar. |
| ub | Upper bound. |
| T | Type of scalar. |
| TU | Type of upper bound. |
| std::invalid_argument | if y is greater than the upper bound. |
Definition at line 668 of file transform.hpp.
| return_type<T_y,T_low,T_high>::type stan::prob::uniform_ccdf_log | ( | const T_y & | y, |
| const T_low & | alpha, | ||
| const T_high & | beta | ||
| ) |
Definition at line 270 of file uniform.hpp.
| return_type<T_y,T_low,T_high>::type stan::prob::uniform_cdf | ( | const T_y & | y, |
| const T_low & | alpha, | ||
| const T_high & | beta | ||
| ) |
Definition at line 125 of file uniform.hpp.
| return_type<T_y,T_low,T_high>::type stan::prob::uniform_cdf_log | ( | const T_y & | y, |
| const T_low & | alpha, | ||
| const T_high & | beta | ||
| ) |
Definition at line 201 of file uniform.hpp.
| 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 | ||
| ) |
The log of a uniform density for the given y, lower, and upper bound.
| y | A scalar variable. |
| alpha | Lower bound. |
| beta | Upper bound. |
| std::invalid_argument | if the lower bound is greater than or equal to the lower bound |
| T_y | Type of scalar. |
| T_low | Type of lower bound. |
| T_high | Type of upper bound. |
Definition at line 44 of file uniform.hpp.
|
inline |
Definition at line 119 of file uniform.hpp.
|
inline |
Definition at line 339 of file uniform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::unit_vector_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | y | ) |
Return the unit length vector corresponding to the free vector y.
The free vector contains K-1 spherical coordinates.
| y | of K - 1 spherical coordinates |
| T | Scalar type. |
Definition at line 1015 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::unit_vector_constrain | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | y, |
| T & | lp | ||
| ) |
Return the unit length vector corresponding to the free vector y.
The free vector contains K-1 spherical coordinates.
| y | of K - 1 spherical coordinates |
| lp | Log probability reference to increment. |
| T | Scalar type. |
Definition at line 1044 of file transform.hpp.
| Eigen::Matrix<T,Eigen::Dynamic,1> stan::prob::unit_vector_free | ( | const Eigen::Matrix< T, Eigen::Dynamic, 1 > & | x | ) |
Definition at line 1067 of file transform.hpp.
| return_type<T_y,T_loc,T_scale>::type stan::prob::von_mises_log | ( | T_y const & | y, |
| T_loc const & | mu, | ||
| T_scale const & | kappa | ||
| ) |
Definition at line 19 of file von_mises.hpp.
|
inline |
Definition at line 115 of file von_mises.hpp.
|
inline |
Definition at line 130 of file von_mises.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_ccdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 254 of file weibull.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_cdf | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 138 of file weibull.hpp.
| return_type<T_y,T_shape,T_scale>::type stan::prob::weibull_cdf_log | ( | const T_y & | y, |
| const T_shape & | alpha, | ||
| const T_scale & | sigma | ||
| ) |
Definition at line 201 of file weibull.hpp.
| 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 | ||
| ) |
Definition at line 24 of file weibull.hpp.
|
inline |
Definition at line 132 of file weibull.hpp.
|
inline |
Definition at line 304 of file weibull.hpp.
| 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 | ||
| ) |
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
| W | A scalar matrix |
| nu | Degrees of freedom |
| S | The scale matrix |
| std::domain_error | if nu is not greater than k-1 |
| std::domain_error | if S is not square, not symmetric, or not semi-positive definite. |
| T_y | Type of scalar. |
| T_dof | Type of degrees of freedom. |
| T_scale | Type of scale. |
Definition at line 62 of file wishart.hpp.
|
inline |
Definition at line 135 of file wishart.hpp.
|
inline |
Definition at line 143 of file wishart.hpp.
| const double stan::prob::CONSTRAINT_TOLERANCE = 1E-8 |
Definition at line 32 of file transform.hpp.