This is an old version, view current version.

22.3 Multivariate Normal Distribution, Cholesky Parameterization

22.3.1 Probability Density Function

If KN, μRK, and LRK×K is lower triangular and such that LL is positive definite, then for yRK, MultiNormalCholesky(y|μ,L)=MultiNormal(y|μ,LL). If L is lower triangular and LLtop is a K×K positive definite matrix, then Lk,k must be strictly positive for k1:K. If an L is provided that is not the Cholesky factor of a positive-definite matrix, the probability functions will raise errors.

22.3.2 Sampling Statement

y ~ multi_normal_cholesky(mu, L)

Increment target log probability density with multi_normal_cholesky_lpdf( y | mu, L) dropping constant additive terms.

22.3.3 Stan Functions

real multi_normal_cholesky_lpdf(vectors y | vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given location vector(s) mu and lower-triangular Cholesky factor of the covariance matrix L

real multi_normal_cholesky_lpdf(vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given location row vector(s) mu and lower-triangular Cholesky factor of the covariance matrix L

real multi_normal_cholesky_lpdf(row_vectors y | vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given location vector(s) mu and lower-triangular Cholesky factor of the covariance matrix L

real multi_normal_cholesky_lpdf(row_vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given location row vector(s) mu and lower-triangular Cholesky factor of the covariance matrix L

vector multi_normal_cholesky_rng(vector mu, matrix L)
Generate a multivariate normal variate with location mu and lower-triangular Cholesky factor of the covariance matrix L; may only be used in transformed data and generated quantities blocks

vector multi_normal_cholesky_rng(row_vector mu, matrix L)
Generate a multivariate normal variate with location mu and lower-triangular Cholesky factor of the covariance matrix L; may only be used in transformed data and generated quantities blocks

vectors multi_normal_cholesky_rng(vectors mu, matrix L)
Generate an array of multivariate normal variates with locations mu and lower-triangular Cholesky factor of the covariance matrix L; may only be used in transformed data and generated quantities blocks

vectors multi_normal_cholesky_rng(row_vectors mu, matrix L)
Generate an array of multivariate normal variates with locations mu and lower-triangular Cholesky factor of the covariance matrix L; may only be used in transformed data and generated quantities blocks