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
-
RNG | Random number generator type. |
- Parameters
-
[in] | K | Number of rows and columns of generated matrix. |
[in] | eta | Degrees of freedom for LKJ distribution. |
[in,out] | rng | Random-number generator to use. |
- Returns
- Random variate with specified distribution.
- Exceptions
-
std::domain_error | If the shape parameter is not positive. |
Definition at line 26 of file lkj_corr_rng.hpp.