LKJ | R Documentation |
Density and random generation for the LKJ distribution for the Cholesky factor of a correlation matrix.
dlkj_corr_cholesky(x, eta, p, log = FALSE)
rlkj_corr_cholesky(n = 1, eta, p)
x |
upper-triangular Cholesky factor of a correlation matrix. |
eta |
shape parameter. |
p |
size of the correlation matrix (number of rows and columns); required because random generation function has no information about dimension of matrix to generate without this argument. |
log |
logical; if TRUE, probability density is returned on the log scale. |
n |
number of observations (only |
See Stan Development Team for mathematical details.
dlkj_corr_cholesky
gives the density and rlkj_corr_cholesky
generates random deviates.
Christopher Paciorek
Stan Development Team. Stan Reference Functions, version 2.27.
Distributions
for other standard distributions
eta <- 3
x <- rlkj_corr_cholesky(1, eta, 5)
dlkj_corr_cholesky(x, eta, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.