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

◆ lkj_corr_rng()

template<class RNG >
Eigen::MatrixXd stan::math::lkj_corr_rng ( size_t  K,
double  eta,
RNG &  rng 
)
inline

Return a random correlation matrix (symmetric, positive definite, unit diagonal) of the specified dimensionality drawn from the LKJ distribution with the specified degrees of freedom using the specified random number generator.

Template Parameters
RNGRandom number generator type.
Parameters
[in]KNumber of rows and columns of generated matrix.
[in]etaDegrees of freedom for LKJ distribution.
[in,out]rngRandom-number generator to use.
Returns
Random variate with specified distribution.
Exceptions
std::domain_errorIf the shape parameter is not positive.

Definition at line 26 of file lkj_corr_rng.hpp.