This is an old version, view current version.

13.8 lkj_cov distribution

Deprecated:The distribution lkj_cov is deprecated.

Replacement: Replace lkj_cov_log(...) with an lkj_corr distribution on the correlation matrix and independent lognormal distributions on the scales. That is, replace

cov_matrix[K] Sigma;
...
Sigma ~ lkj_cov(mu, tau, eta);

with

corr_matrix[K] Omega;
vector<lower=0>[K] sigma;
...
Omega ~ lkj_corr(eta);
sigma ~ lognormal(mu, tau);
...
cov_matrix[K] Sigma;
Sigma <- quad_form_diag(Omega, sigma);

The variable Sigma may be defined as a local variable in the model block or as a transformed parameter. An even more efficient transform would use Cholesky factors rather than full correlation matrix types.